note 56853 deleted from function.version-compare by aidan
| From: | aidan@php.net | Date: | Fri, 07 Oct 2005 23:53:27 +0000 |
| Subject: | note 56853 deleted from function.version-compare by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96583@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Beware of trailing zeros!
Observe the following (run on php4.3.2 RedHat):
<?
echo version_compare("4.3.2", "4.3.1")."\n";
echo version_compare("4.3.2", "4.3.10")."\n";
?>
output:
1
-1
I discovered this because somebody's installer script was complaining about my php version,
when it was clearly sufficient. I'm on 4.3.2, and they specified the minimum as 4.3.10