Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

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
(
)
HomeMenu