Re: [PHP-DEV] Regarding constructions like func()[0]

2009-11-08 Thread Richard Quadling
2009/11/8 jvlad : >>> >>> >> >> Whilst you are all thinking about this, how about ... >> >> $value = (function(){return $x;})(); >> >> Being able to call an anonymous function inline would certainly be a >> useful mechanism. Allowing calls without creating dummy user land vars >> would be consisten

Re: [PHP-DEV] Regarding constructions like func()[0]

2009-11-08 Thread jvlad
>> >> > > Whilst you are all thinking about this, how about ... > > $value = (function(){return $x;})(); > > Being able to call an anonymous function inline would certainly be a > useful mechanism. Allowing calls without creating dummy user land vars > would be consistent with func()[0]. > If you

Re: [PHP-DEV] Regarding constructions like func()[0]

2009-11-08 Thread jvlad
""melfar"" wrote in message news:0f.f6.03668.ad206...@pb1.pair.com... > Hey, > > Yep, I think there might be some caveats to that change. > The original patch did not work on methods, so I've fixed that and also > made the return value an rvalue, so that you can't attempt to modify the > tempora