Is it possible to get extension version in php?
get_loaded_extensions
returns only loaded extentions names, but not versions :(
The general command we will be using is php -m. This command will give you the full list of installed PHP modules/extensions.
1. Type the following command, replacing [location] with the path to your PHP installation. 2. Typing php -v now shows the PHP version installed on your Windows system.
PHP extensions are usually called "php_*. dll" (where the star represents the name of the extension) and they are located under the "PHP\ext" folder.
I believe this is what you're looking for:
$version = phpversion("extensionName");
More information
At the command line, where extension is the extension name.
php --re extension | head -1
If unsure of the extension name, list extensions with php -m
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With