Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61602 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76018 invoked from network); 21 Jul 2012 07:52:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2012 07:52:27 -0000 Authentication-Results: pb1.pair.com header.from=ajfweb@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajfweb@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:52255] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/30-07940-ABF5A005 for ; Sat, 21 Jul 2012 03:52:27 -0400 Received: by wgx1 with SMTP id 1so3365350wgx.11 for ; Sat, 21 Jul 2012 00:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rhoT5bK0j7gpwSmibZzzmqPpYGaPMDsHEvp3KzSBsOI=; b=Ujq27QJwX6olnE7AtW5P/njZlys4E6mSvTftSPXL09ouBRPMGU8MAGUeA6IPmMbnRg wrMVeVjmu6Agd5CbmBbEBqlEZSOQxK/vMB5oYLRw9+jGaRLwyVqofEPuHZmZ+P8koJyu p1XWaBch7qbz2DGNqE0vXV/HjtdXNLzydQcKz4MwB1NgN+4aolp4AK9P6YSbAAqPrUCG OvOgvPgGFd2F71OYiMLJOJN/nk6oe8pGxgQvKk7sWMYP7xO3s+Sx/B8UNCopV8iZrqgi aTFiJvrOck/2OkwgO+9MVrvnwNf1lPMdo0SRHW5dkMZxc0BmdIM2b7zHsohTIzGvT6Nb RV6Q== MIME-Version: 1.0 Received: by 10.180.81.138 with SMTP id a10mr20574218wiy.7.1342857143473; Sat, 21 Jul 2012 00:52:23 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Sat, 21 Jul 2012 00:52:23 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Sat, 21 Jul 2012 00:52:23 -0700 (PDT) In-Reply-To: References: <5009C8AA.10603@sugarcrm.com> Date: Sat, 21 Jul 2012 08:52:23 +0100 Message-ID: To: Kris Craig Cc: internals@lists.php.net, Rasmus Schultz Content-Type: multipart/alternative; boundary=f46d044401ba05571f04c5524bbe Subject: Re: [PHP-DEV] common issue with version_compare() From: ajfweb@googlemail.com (Andrew Faulds) --f46d044401ba05571f04c5524bbe Content-Type: text/plain; charset=UTF-8 Yeah, that would definitely be a bug. On Jul 21, 2012 7:23 AM, "Kris Craig" wrote: > > 1.01 eq 1.1 > > Could you explain this one to me? In every versioning system I've ever > used, 1.1 would be greater than 1.01, not equal. > > > On Fri, Jul 20, 2012 at 5:07 PM, Stas Malyshev >wrote: > > > > > Hi! > > > > > > >> For example, I was not the only one who found it odd that "1.0" is > > > >> considered less than "1.0.0" - wouldn't it make sense to "pad" the > > > shortest > > > >> version-number with zeroes? e.g. "1.0" if compared against "1.0.0" > > > would be > > > >> padded with zeroes at the end, e.g. as "1.0.0". > > > > > > 1.0.0 and 1.0 are different things. If you want to make a comparison > > > that takes into account only two components, you can just cut them both > > > to two components, then compare. > > > -- > > > Stanislav Malyshev, Software Architect > > > SugarCRM: http://www.sugarcrm.com/ > > > (408)454-6900 ext. 227 > > > > --f46d044401ba05571f04c5524bbe--