Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61583 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29334 invoked from network); 20 Jul 2012 22:22:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2012 22:22:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=hartmut.holzgraefe@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hartmut.holzgraefe@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: hartmut.holzgraefe@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:40855] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/6F-18983-B2AD9005 for ; Fri, 20 Jul 2012 18:22:35 -0400 Received: by wibhn17 with SMTP id hn17so811739wib.11 for ; Fri, 20 Jul 2012 15:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=PQwVVmrpvE0eFwS04ybDs4vYWdVeZeuiCUxKvFpd/V0=; b=H2GJmhpZdKooWyzHWSSjQnQL5cAYhTcRgKttA2Kr0xFfEmrmLRshabzm7mfyit+Zif djyICUumz8oEnMhaOjh0Gmemso9QnnS/8mJo45nICuSAnUiywKOoLPOelqd7162cEh1z 8W0u8IlXcjUz14T9+aHR+90NKGiRauDJ0s7vtWsbWaqVx9cbEyDF1YnzezNT00tsP5db jKAkxfWmV5LF+Lb07HxnbZgqpTt3JrdjiX0c+V5pX3qKmDQiF5AoY/p+oQVE3zod85RN y9rrJNFUi7juuBy67LAgqW7yigoSZkPCHdoyCzfMpZSGLP5iKHOfpnuB7nyjojwRzGr7 +B5Q== Received: by 10.180.14.193 with SMTP id r1mr17882241wic.19.1342822952081; Fri, 20 Jul 2012 15:22:32 -0700 (PDT) Received: from [192.168.23.10] (212.100.42.202.fixip.bitel.net. [212.100.42.202]) by mx.google.com with ESMTPS id cu1sm108196wib.6.2012.07.20.15.22.30 (version=SSLv3 cipher=OTHER); Fri, 20 Jul 2012 15:22:31 -0700 (PDT) Message-ID: <5009DA26.9020603@gmail.com> Date: Sat, 21 Jul 2012 00:22:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <5009C8AA.10603@sugarcrm.com> In-Reply-To: <5009C8AA.10603@sugarcrm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] common issue with version_compare() From: hartmut.holzgraefe@gmail.com (Hartmut Holzgraefe) On 07/20/2012 11:07 PM, Stas Malyshev wrote: > 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. it is hart to imagine a 1.0 followed by 1.0.0 in real world, but the only reason for something like this that i can come up with is that, for whatever reason, a project wants to change from two component version numbers to three component ones right after having done a 1.0. And in that case a 1.0.0 following the 1.0 would be a new release, even if it only differs by the extra .0 And so 1.0 < 1.0.0 would be perfectly correct. -- hartmut