Updated: 28 September 2026 · Applies to: PHP 8.1 to 8.4 on cPanel & WHM 138 (Jupiter theme)
The php -m command lists the extensions (modules) loaded by the PHP command-line interpreter.
Examples
php -m # all loaded modules php -m | grep -i mbstring # check for one module php -i | grep -i "loaded configuration" # which php.ini is used
On cPanel servers each PHP version has its own binary, for example /opt/cpanel/ea-php83/root/usr/bin/php -m (or /opt/alt/php83/usr/bin/php -m on CloudLinux).
Note: The command-line PHP can differ from the version and settings your website uses. To check the website's modules, use a phpinfo() page.