#41759 [Opn->Bgs]: Array index from function returned array

From: Date: Thu, 21 Jun 2007 21:43:09 +0000
Subject: #41759 [Opn->Bgs]: Array index from function returned array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114041@lists.php.net to get a copy of this message
ID: 41759 Updated by: johannes@php.net Reported By: rudi at mageuk dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: All PHP Version: 5.2.3 New Comment: This has been discussed multiple times and currently nobody is able to provide a acceptable patch. Please see internals mailing list archives for more information on this. Previous Comments: ------------------------------------------------------------------------ [2007-06-21 11:50:27] rudi at mageuk dot com Description: ------------ I don't know the exact name for this. But being able to reference an index from a function that returns an array would be very usefull. Reproduce code: --------------- function returnarray() { return array('abc' => 'blah blah', '123' => 'blee blee'); } echo returnarray()['abc']; echo returnarray()['123']; Expected result: ---------------- blah blah blee blee Actual result: -------------- Parse Error as it's obviously not implemented... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41759&edit=1

« previous php.bugs (#114041) next »