get_loaded_extensions
Description
The get_loaded_extensions of Options / Information for PHP returns an array with the names of all modules compiled and loaded.
Syntax
get_loaded_extensions( bool $zend_extensions = false ): array
Parameters
zend_extensions
Only return Zend extensions, if not then regular extensions, like mysqli are listed. Defaults to false (return regular extensions).
Return
Returns an indexed array of all the modules names.
Examples
1 · void
<? $return = get_loaded_extensions(); print_r($return); ?>
Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => sqlite3 [6] => zlib [7] => bz2 [8] => calendar [9] => ctype [10] => curl [11] => hash [12] => filter [13] => ftp [14] => gettext [15] => json [16] => iconv [17] => SPL [18] => pcntl [19] => random [20] => readline [21] => Reflection [22] => session [23] => standard [24] => mbstring [25] => shmop [26] => SimpleXML [27] => tokenizer [28] => xml [29] => litespeed [30] => i360 [31] => bcmath [32] => dom [33] => fileinfo [34] => gd [35] => gmp [36] => exif [37] => mysqlnd [38] => mysqli [39] => PDO [40] => pdo_sqlite [41] => Phar [42] => posix [43] => snmp [44] => sockets [45] => zip )
2 · zend_extensions · false
<? $zend_extensions = false; $return = get_loaded_extensions($zend_extensions); print_r($return); ?>
Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => sqlite3 [6] => zlib [7] => bz2 [8] => calendar [9] => ctype [10] => curl [11] => hash [12] => filter [13] => ftp [14] => gettext [15] => json [16] => iconv [17] => SPL [18] => pcntl [19] => random [20] => readline [21] => Reflection [22] => session [23] => standard [24] => mbstring [25] => shmop [26] => SimpleXML [27] => tokenizer [28] => xml [29] => litespeed [30] => i360 [31] => bcmath [32] => dom [33] => fileinfo [34] => gd [35] => gmp [36] => exif [37] => mysqlnd [38] => mysqli [39] => PDO [40] => pdo_sqlite [41] => Phar [42] => posix [43] => snmp [44] => sockets [45] => zip )
3 · zend_extensions · true
<? $zend_extensions = true; $return = get_loaded_extensions($zend_extensions); print_r($return); ?>
Array ( )
Links
Related
Options / Information
- assert
- assert_options
- cli_get_process_title
- cli_set_process_title
- dl
- extension_loaded
- gc_collect_cycles
- gc_disable
- gc_enable
- gc_enabled
- gc_mem_caches
- gc_status
- get_cfg_var
- get_current_user
- get_defined_constants
- get_extension_funcs
- get_include_path
- get_included_files
- get_required_files
- get_resources
- getenv
- getlastmod
- getmygid
- getmyinode
- getmypid
- getmyuid
- getopt
- getrusage
- ini_alter
- ini_get
- ini_get_all
- ini_parse_quantity
- ini_restore
- ini_set
- memory_get_peak_usage
- memory_get_usage
- memory_reset_peak_usage
- php_ini_loaded_file
- php_ini_scanned_files
- php_sapi_name
- php_uname
- phpcredits
- phpinfo
- phpversion
- putenv
- set_include_path
- set_time_limit
- sys_get_temp_dir
- version_compare
- zend_thread_id
- zend_version