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 <bobw...@hotmail.com> wrote: > Am 18.09.2013 um 21:57 schrieb "Leigh" <lei...@gmail.com>: > > On 18 September 2013 18:50, Bob Weinand <bobw...@hotmail.com> 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 > >