'How to get only the version of mcrypt in PHP?
phpinfo() shows:
several info...
mcrypt support enabled
mcrypt_filter support enabled
Version 2.5.8
several info...
But how can I get ONLY the version of MCRYPT?
For example:
echo phpversion('intl');
or:
gd_info()['GD Version'];
I searched Google but could not find an answer, and phpinfo() is a lot of info.
Solution 1:[1]
PHP has a built-in function called phpversion. [ DOCUMENTATION ]
This function allows you to retrieve the version of an installed extension. You'd use it like so:
<?php
// prints e.g. 'Current PHP version: 4.1.1'
echo 'Current PHP version: ' . phpversion();
// prints e.g. '2.5.8' or nothing if the extension isn't enabled
echo phpversion('mcrypt');
?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Glorfindel |
