php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40270 version_compare() default
Submitted: 2007-01-29 10:42 UTC Modified: 2007-01-29 10:54 UTC
From: vin100 at forx dot fr Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.2.0 OS:
Private report: No CVE-ID: None
 [2007-01-29 10:42 UTC] vin100 at forx dot fr
Description:
------------
version_compare() failled with 'RC'


Reproduce code:
---------------
var_export(version_compare('2.0 beta 2', '2.0 beta 3'));
var_export(version_compare('2.0 beta 2', '2.0 RC 1'));

Expected result:
----------------
-1-1

Actual result:
--------------
-11

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-29 10:54 UTC] tony2001@php.net
Remove the whitespaces:
version_compare("2.0beta2", "2.0RC1");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC