Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96859 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18741 invoked from network); 12 Nov 2016 16:48:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Nov 2016 16:48:07 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:60022] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/B1-05927-5C747285 for ; Sat, 12 Nov 2016 11:48:06 -0500 Received: from [192.168.1.190] ([79.243.119.150]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lxxrw-1cr12s1XIS-015Hli; Sat, 12 Nov 2016 17:47:54 +0100 To: David Walker , =?UTF-8?Q?Lauri_Kentt=c3=a4?= References: <3e3180e8-e9c2-abca-5228-221f8eae713d@fleshgrinder.com> <9a84054848086fa4c2965f93dd3b56a3@gmail.com> Cc: "internals@lists.php.net >> PHP Internals" , Andrea Faulds Message-ID: Date: Sat, 12 Nov 2016 17:47:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:G/GuAWxVi9CZczV53bEC4bA2f6A609B3s83xmodSgk/2zeXd/YO b0ENSQgM8GxxicAv6ziXbxEXPRfu5RutAnzwaht2+a1OnLym0//FcyoRCNKX9yB9FeUm/nh YMV9uhsJe0IPDprUug4WdEuxP2yUQPaJwg86K3IVpQsZVhO7PSUuETTn8zImBLqdflk1VO5 WgtYz1jhpA8ANNy3byQLQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+3Jeua5jMgQ=:ETOvkmJCBphgxOqV+ibX/K Eg3zWpAJlXWEY+IfVEymXTQkDA7JIjx0j/rKe14wwXCceRTBbi+RK/u7ibrZNpl8BSDUHZsdG 8F2pGNuHXJBGlT5HMZJVt4wpMLeM+Of2gllUFNyAuIAUuutR6MuuhbMkF6RsrdC2bU3AwdNMr VUhTrR71z4cA0Z1WyIMZCIH8e2SKkmIVkSt7Rnty86LrjyaD841Uveu8VJGkg41uTIJ2It7NC SsSXUpMMbrWO21Twycchp5IBlUZLznuAf0qKGExKPXR5B9p6VpDyiQpnE7I8Z4gNf83aLZXGM M2nSjEo0tiPAFGT2aCxUyk132Q45iEEm//XakDeNzHTq8R4KF2coRcUKssbQoaiP3fZEfK60S MJpjJ/3AtkSdWn0D7y/RaJqxftNmINTfQ5N420jDTgT7aFv0SOnMP6HCmDsKkNYL5jEe4A35V 8rTrcXZLKmJkHmi87Rn2j5Ewr6z1uepngbnpWNKIzutw24IUEJIPiHQMFqFmjKJyFKv3+hfs7 NCL6d2MnPwrUFxyjkv/oGRp8s8kSR78tv9IoAMr0BRZSgxULg+OWMZMTm1jSFq5BpIj//ULOs OUj0UMDUZc6cJOZM4LzedBtBwlpBb9jY7ifi/PfyD9g7vV9POA56UGsVLmcNEBd4h38iKUJiG 9UQ50bT4su4QsOsTHAW5RC0glBFTiGodWm3t9fmMK+KeElrTWWcPa5NMVoFdM04a0+Xjt2vBZ hqjPAvmBoXdkJsJ3ZTNWnPXxtgkSwjb+gn85ZaSkSGdONdbtVEN5eaFxz/H0fjBSjEEXcl+z5 /ft32Dk Subject: Re: [PHP-DEV] [RFC] Interval Comparison From: cmbecker69@gmx.de ("Christoph M. Becker") On 12.11.2016 at 17:21, David Walker wrote: > Should > $a = 1; > var_dump(1 < $a++ < 3); > > (expanded into numbers) be evaluated as: > 1 < 2 && 2 < 3 - True > or > 1 < 2 && 3 < 3 - False In my opinion, that should evaluate to 1 < 1 // false because we have a post-increment operator, and it seems to me that the expansion defined for Python[1] makes most sense: > Comparisons can be chained arbitrarily, e.g., x < y <= z is > equivalent to x < y and y <= z, except that y is evaluated only once > (but in both cases z is not evaluated at all when x < y is found to > be false). [1] -- Christoph M. Becker