Re: Suggestion: echo function(var)[0];

From: Date: Fri, 04 Jun 2010 01:29:24 +0000
Subject: Re: Suggestion: echo function(var)[0];
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-48639@lists.php.net to get a copy of this message
On Fri, Jun 4, 2010 at 11:19 AM, Kalle Sommer Nielsen <kalle@php.net> wrote: > Hi Tig > > 2010/6/4 Tig <tigger.on@gmail.com>: >> Would be at all possible to implement this kind of shortcut? > > Its called array-dereferencing and it was proposed countless times, > including by myself. There is an RFC for this[1] and it was planned on > the old PHP6 todo at the PDT[2]. > > [1] http://wiki.php.net/rfc/functionarraydereferencing > [2] http://wiki.php.net/summits/pdmnotesmay09#php_6 (see point > #13) > Thanks Kalle, I had no idea what it would be called, so I had a hard time searching for it :] I noticed that it has been 'declined' - Date: May 01, 2009 (declined), http://wiki.php.net/rfc/functionarraydereferencing but, as pointed out at point 13 on http://wiki.php.net/summits/pdmnotesmay09#php_6 function call chaining (f()() if f() returns function), and array dereferencing (f()[0]) - (Stas) So does this mean array-dereferencing was original declined but still a possible for PHP 6? That is how I'm reading it, but just want to make sure. Again, thanks. -Tig

« previous php.internals (#48639) next »