Re: echo returnArray()['a']; // workaround

From: Date: Fri, 29 Feb 2008 05:34:37 +0000
Subject: Re: echo returnArray()['a']; // workaround
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-270710@lists.php.net to get a copy of this message
Casey wrote:
I don't know why I'm continuing this... but for the truly crazy: function w(&$t) { $t = array('f' => '...'); return 't'; } echo ${w($t)}['f'];
addictive isn't it! casey, I truelly believe that's as short as it can get - and a great bit of code reduction - most impressed :D concider: w()['f'] the only additions are a ${} wrapper! nice

« previous php.general (#270710) next »