note 55270 deleted from function.phpversion by derick

From: Date: Fri, 04 Aug 2006 13:19:56 +0000
Subject: note 55270 deleted from function.phpversion by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-115546@lists.php.net to get a copy of this message
Note Submitter: nick at divbyzero dot com ---- Of course, if you want to COMPARE versions, you can't just compare them numerically, so try something like: <?php echo phpversion()."\n"; //4.3.10-15 $v2 = preg_replace("/[^0-9\.]+/","",phpversion()); //4.3.1015 $v=$v2-0; // 4.3 $v2=substr($v2,strlen($v."")+1); //1015 echo $v." ".$v2."\n"; echo ($v>4.3 || ($v==4.3 && $v2>=1))."\n"; // 1 if >= 4.3.1 ?>

« previous php.notes (#115546) next »