October 2005
Intermediate to advanced
372 pages
11h 35m
English
get_loaded_extensions()
array get_loaded_extensions ( void )
The get_loaded_extensions() function takes no parameters and returns an array of the names of all extensions you have loaded.
$extensions = get_loaded_extensions();
echo "Extensions loaded:\n";
foreach($extensions as $extension) {
echo " $extension\n";
}If you just want to check whether a specific extension is loaded or not, without having to go through the fuss of sifting through the return value of get_loaded_extensions(), you can use the simple shortcut function extension_loaded(), which takes an extension name as its only parameter and returns true if it has loaded or false if not.