svn: /phpdoc/en/trunk/reference/info/functions/ phpversion.xml
| From: | Daniel P. Brown | Date: | Thu, 15 Oct 2009 16:09:39 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/info/functions/ phpversion.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5149@lists.php.net to get a copy of this message | ||
danbrown Thu, 15 Oct 2009 16:09:39 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289673
Log:
Addresses Bug #49854.
Bug: http://bugs.php.net/49854 (Open) function.phpversion:
bad code in manual example
Changed paths:
U phpdoc/en/trunk/reference/info/functions/phpversion.xml
Modified: phpdoc/en/trunk/reference/info/functions/phpversion.xml
===================================================================
--- phpdoc/en/trunk/reference/info/functions/phpversion.xml 2009-10-15 15:49:40 UTC (rev 289672)
+++ phpdoc/en/trunk/reference/info/functions/phpversion.xml 2009-10-15 16:09:39 UTC (rev 289673)
@@ -72,9 +72,9 @@
// version is lower than that, then emulate it
if(!defined('PHP_VERSION_ID'))
{
- $version = PHP_VERSION;
+ $version = explode('.',PHP_VERSION);
- define('PHP_VERSION_ID', ($version{0} * 10000 + $version{2} * 100 + $version{4}));
+ define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
// PHP_VERSION_ID is defined as a number, where the higher the number
@@ -92,9 +92,9 @@
if(PHP_VERSION_ID < 50207)
{
- define('PHP_MAJOR_VERSION', $version{0});
- define('PHP_MINOR_VERSION', $version{2});
- define('PHP_RELEASE_VERSION', $version{4});
+ define('PHP_MAJOR_VERSION', $version[0]);
+ define('PHP_MINOR_VERSION', $version[1]);
+ define('PHP_RELEASE_VERSION', $version[2]);
// and so on, ...
}