#45662 [Opn->Bgs]: 'pre' token should be added to version_compare
| From: | felipe@php.net | Date: | Fri, 01 Aug 2008 12:02:24 +0000 |
| Subject: | #45662 [Opn->Bgs]: 'pre' token should be added to version_compare | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127464@lists.php.net to get a copy of this message | ||
ID: 45662
Updated by: felipe@php.net
Reported By: geoff at darktrojan dot net
-Status: Open
+Status: Bogus
Bug Type: PHP options/info functions
Operating System: *
PHP Version: 5.2.6
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Says the documentation:
'version_compare() compares two "PHP-standardized" version number
strings.'
PHP doesn't use 'pre'.
Previous Comments:
------------------------------------------------------------------------
[2008-07-31 01:31:00] geoff at darktrojan dot net
Description:
------------
To allow correct comparison of Mozilla versioning numbers (e.g.
comparing user-agent strings), the token 'pre' should be added to
version_compare. Mozilla use pre to indicate a pre-alpha release (e.g.
3.0a8pre is earlier than 3.0a8).
pre should have the same status as dev in /ext/standard/versioning.c
Reproduce code:
---------------
echo version_compare ('3.0a8pre', '3.0a8');
Expected result:
----------------
-1
Actual result:
--------------
1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45662&edit=1