Edit report at http://bugs.php.net/bug.php?id=49103&edit=1

 ID:                 49103
 Updated by:         [email protected]
 Reported by:        Mathias dot Slawik at matzelworkz dot de
 Summary:            Use array return value of function as array
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   All
 PHP Version:        5.3.0
-Assigned To:        
+Assigned To:        jani
 Block user comment: N
 Private report:     N

 New Comment:

Array dereferencing has been added in trunk. Next release from that
(maybe 5.4.0 or something else :) has it. :)


Previous Comments:
------------------------------------------------------------------------
[2009-07-29 21:51:50] Mathias dot Slawik at matzelworkz dot de

Description:
------------
There is no syntax to use an array return value of a function directly
as array.

Reproduce code:
---------------
function foo() {

   return array("bar", "baz");

}



print foo()[0];

Expected result:
----------------
bar

Actual result:
--------------
Parse error: parse error on line 5


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=49103&edit=1

Reply via email to