solvit.io

Find all the extensions loaded by PHP

Solution #1
$ php -m

[PHP Modules]
apc
apcu
bcmath
bz2
...
Solution #2
$extensions = get_loaded_extensions();
// $extensions = [
//     0 => 'apc',
//     1 => 'apcu',
//     2 => 'bcmath',
//     3 => 'bz2',
//     ...
// ];

// if you only want to return Zend-type extensions
$zendExtensions = get_loaded_extensions(true);
Find more solutions about: ,