What's the best method for checking the PHP version number.

I'm assuming that include() was available in all versions, so, from my main
index.php script, I include a local script (common.php) :

<?php
// assume minimum version of PHP required is 4.0.5
if (phpversion() < 4) { die("wrong version"); }
$ver = explode(".", phpversion());
if ($ver[2] < 5) { die("wrong version"); }
?>

The problem I can see is that some of the earlier 4+ versions had a funny
number scheme - i.e. 4.0.1pl2.

Does anyone have a complete list of version numbers (or a better method of
version checking)?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to