note 17965 deleted from function.version-compare by sniper
| From: | sniper@php.net | Date: | Mon, 04 Aug 2003 14:15:57 +0000 |
| Subject: | note 17965 deleted from function.version-compare by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53326@lists.php.net to get a copy of this message | ||
Note Submitter: JoeDoeXP@isithotmail.com
----
[Editor Note: an easy hack to get integer from PHP_VERSION is:
$php_version = (int) preg_replace("/[^\d]*/", '', PHP_VERSION);
]
Be aware that this function only works in v4.1.0 and above, I noticed only after implementing.
Anyway, here's a little snippet that you can use to check for a minimum version:
if (version_compare( phpversion(), "4.1.1") < 0)
echo "Minimum version not met.";
else
echo "You're in!";