solvit.io

Find if a given extension is loaded by PHP

Solution #1
$ php -m | grep extension-name

If the output is empty, the extension is not loaded.

Example
$ php -m | grep intl

intl
Solution #2
$isLoaded = extension_loaded('extension-name');
Example
$isLoaded = extension_loaded('intl');
// $isLoaded = true;
Find more solutions about: ,