note 93976 deleted from function.phpversion by danbrown

From: Date: Fri, 09 Oct 2009 16:13:19 +0000
Subject: note 93976 deleted from function.phpversion by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161588@lists.php.net to get a copy of this message
Note Submitter: clancy hood at gmail dot com ---- example #2 in the documentation above appears to be erroneous. <?php // PHP_VERSION_ID is available as of PHP 5.2.7, if our // version is lower than that, then emulate it if(!defined('PHP_VERSION_ID')) { $version = PHP_VERSION; define('PHP_VERSION_ID', ($version{0} * 10000 + $version{2} * 100 + $version{4})); } ?> gives PHP 4.3.11 version id as 40301 rather than 40311. Use: <?php list($major, $minor, $release) = explode('.', PHP_VERSION); ?>

« previous php.notes (#161588) next »