Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69220 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56869 invoked from network); 19 Sep 2013 02:20:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2013 02:20:05 -0000 Authentication-Results: pb1.pair.com header.from=william.a.bartlett@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=william.a.bartlett@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.171 as permitted sender) X-PHP-List-Original-Sender: william.a.bartlett@gmail.com X-Host-Fingerprint: 209.85.214.171 mail-ob0-f171.google.com Received: from [209.85.214.171] ([209.85.214.171:56684] helo=mail-ob0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/B4-29009-35F5A325 for ; Wed, 18 Sep 2013 22:20:04 -0400 Received: by mail-ob0-f171.google.com with SMTP id wm4so8884677obc.16 for ; Wed, 18 Sep 2013 19:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WOG4DsVcsI0jGh7yK18LIZWpTinLao0IO8CARJrfxtE=; b=aV2wpeKhGm6wXd81+/5X4eSSBvm13C8Ui94xb96cCKQldJnDr+zDCob9gCcC+JByhp s4LqV9kdoGSeYQ4SG+IZiC5E1iGtw6GWk26Bu2w9tfoX0p+xZHHYQenM5z0NpImZcULN 54bHeZh18Xtz47ggsWaFRB7ObN0/s49LHwxG5SAr16d2R/8mxR4YQ83NPLf/R7ps0n5g BlVLmpz5qHfjcQb8a6ZlXAmZh6RtjaIY/H6ApgfJLP8QC9OF0eyjmsfxzrQStuXaXBDp D7IUOyY+B1ZArLCSzwskYCB1yeyve2szFmQsldmgDvjk5c73ESjrKZHvTfDt1R0n74VP 0duw== MIME-Version: 1.0 X-Received: by 10.182.246.39 with SMTP id xt7mr12852935obc.16.1379557201035; Wed, 18 Sep 2013 19:20:01 -0700 (PDT) Received: by 10.60.34.164 with HTTP; Wed, 18 Sep 2013 19:20:00 -0700 (PDT) In-Reply-To: References: <49D57F66323040FC9AE48244DAAF3771@gmail.com> <012B9378-3C3A-4169-96D3-3B57D6C7A82C@seancoates.com> Date: Wed, 18 Sep 2013 22:20:00 -0400 Message-ID: To: Bob Weinand Cc: Leigh , Developers List PHP Mailing Content-Type: multipart/alternative; boundary=001a11c2e224eab0f304e6b33055 Subject: Re: [PHP-DEV] Re: Allowing is_* functions to accept multiple parameters From: william.a.bartlett@gmail.com (William Bartlett) --001a11c2e224eab0f304e6b33055 Content-Type: text/plain; charset=ISO-8859-1 I would argue that LTR support is also inconsistent / not desired. If I wrote: $i = 0; is_three($i = $i + 1, $i = $i + 1, $i = $i + 1); I would certainly expect is_three to return false, but I would also expect $i to contain three. php doesn't normally evaluate arguments lazily, it would be weird for that behavior to suddenly crop up. users who want lazy evaluation can write it the traditional way (with &&). PS - hi, this is my first post on php-internals though i've been reading for like a month. -Will Bartett -- William Bartlett College of Engineering | Cornell University '14 240-432-5189 On Wed, Sep 18, 2013 at 4:05 PM, Bob Weinand wrote: > Am 18.09.2013 um 21:57 schrieb "Leigh" : > > On 18 September 2013 18:50, Bob Weinand wrote: > >> At least, from a technical point, evaluating LTR would require to > change the engine > >> (would be some more complex change as it would require to switch > between contexts > >> and being able to execute the ZEND_SEND_VAL opcodes one by one > > > > Feels like you're overthinking it? > > > > Plan was to allow any is_* function to be called as normal (SEND_VAR, > > SEND_VAR ... FCALL), then iterate over the supplied arguments inside > > the function and return false at the first failure, emulating the > > boolean short circuit. > > Well, the arguments are executed at the moment where the ZEND_SEND_VAR op > is encountered. But this you already can do with the one liner in my last > mail. > > So LTR support is basically not worth it here (too many change/too much > cost for this). > > Bob Weinand > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11c2e224eab0f304e6b33055--