Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72203 invoked from network); 9 Nov 2016 19:48:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2016 19:48:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.89 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.89 mx108.easyname.com Received: from [77.244.243.89] ([77.244.243.89:45353] helo=mx204.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/F7-15787-B7D73285 for ; Wed, 09 Nov 2016 14:48:14 -0500 Received: from cable-81-173-133-127.netcologne.de ([81.173.133.127] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1c4Yqu-0006Vv-Q6; Wed, 09 Nov 2016 19:48:08 +0000 Reply-To: internals@lists.php.net References: <3e3180e8-e9c2-abca-5228-221f8eae713d@fleshgrinder.com> To: David Walker , internals@lists.php.net, Andrea Faulds , lauri.kentta@gmail.com Message-ID: Date: Wed, 9 Nov 2016 20: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-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC] Interval Comparison From: php@fleshgrinder.com (Fleshgrinder) On 11/8/2016 10:57 PM, David Walker wrote: > I don't think that alone allows the chaining of comparisons. I'd have to > look closer, but it'd seem to me that zend_ast_create_binary_op > (ZEND_AST_BINARY_OP) evaluation might need to be amended as well. Seems it > eventually calls a `op(zval*,zval*,zval*) so the evaluated end of: one op > would be a true/false, when comparing against another boolean op. > > Regardless of implementation, the core question you raised was should > something like it exist, I'm still a strong yes on that front. I'd just > promote introducing the left precedence and allowing the arbitrary chains > of comparison, rather than just a single interval comparison. > > cheers > -- > Dave > Yeah maybe not that easy but also not too complicated if we add associativity to the mix. I am open for both variations and could write up an RFC with a vote for both if desired. Not sure if I find the time to look into actual implementation but I most certainly can try. -- Richard "Fleshgrinder" Fussenegger