svn: /phpdoc/en/trunk/reference/info/functions/ version-compare.xml
| From: | Richard Quadling | Date: | Mon, 07 Dec 2009 14:48:08 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/info/functions/ version-compare.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5622@lists.php.net to get a copy of this message | ||
rquadling Mon, 07 Dec 2009 14:48:08 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291819
Log:
Example fixed. Fix #50381
Bug: http://bugs.php.net/50381 (Open) Error in
version_compare() example
Changed paths:
U phpdoc/en/trunk/reference/info/functions/version-compare.xml
Modified: phpdoc/en/trunk/reference/info/functions/version-compare.xml
===================================================================
--- phpdoc/en/trunk/reference/info/functions/version-compare.xml 2009-12-07 13:43:44 UTC (rev
291818)
+++ phpdoc/en/trunk/reference/info/functions/version-compare.xml 2009-12-07 14:48:08 UTC (rev
291819)
@@ -110,15 +110,15 @@
<programlisting role="php">
<![CDATA[
<?php
-if (version_compare(PHP_VERSION, '6.0.0') === 1) {
+if (version_compare(PHP_VERSION, '6.0.0') >= 0) {
echo 'I am at least PHP version 6.0.0, my version: ' . PHP_VERSION . "\n";
}
-if (version_compare(PHP_VERSION, '5.3.0') === 1) {
+if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
echo 'I am at least PHP version 5.3.0, my version: ' . PHP_VERSION . "\n";
}
-if (version_compare(PHP_VERSION, '5.0.0', '>')) {
+if (version_compare(PHP_VERSION, '5.0.0', '>=')) {
echo 'I am using PHP 5, my version: ' . PHP_VERSION . "\n";
}