Bug #72795 [Opn->Nab]: Function version_compare

From: Date: Tue, 09 Aug 2016 16:21:41 +0000
Subject: Bug #72795 [Opn->Nab]: Function version_compare
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203118@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72795&edit=1 ID: 72795 Updated by: cmb@php.net Reported by: dink10 at rambler dot ru Summary: Function version_compare -Status: Open +Status: Not a bug Type: Bug -Package: *General Issues +Package: Unknown/Other Function Operating System: all PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This is not a bug. Consider, for instance, the following: 'abc' <= 'ab' // => false version_compare() works the same (of course, not single characters, but instead groups delimited by separators are compared). BTW: echo version_compare( (float)"10.1.0", (float)"10.1", "<=" ); is identical to echo version_compare(10.1, 10.1, '<='); Previous Comments: ------------------------------------------------------------------------ [2016-08-09 12:09:17] dink10 at rambler dot ru Description: ------------ Function version compare works incorrectly. Example echo version_compare( "10.1.0", "10.1", "<=" ); Output: false It wotrks only in next case: echo version_compare( (float)"10.1.0", (float)"10.1", "<=" ); I suppose it is bug ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72795&edit=1

« previous php.bugs (#203118) next »