|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-07 17:22 UTC] derick@php.net
[2009-10-07 19:48 UTC] valerio dot giuffrida88 at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 18:00:02 2025 UTC |
Description: ------------ If i want to get an element of an array directly returned by a function, using [], it will prints Parse error: syntax error, unexpected '[', expecting ',' or ';' in php shell code on line 1 Reproduce code: --------------- $a = array("a","b","c"); echo array_values($a)[0]; //it (doesnt) works with any function that retuns an array Expected result: ---------------- print to screen something like that: a Actual result: -------------- Parse error: syntax error, unexpected '[', expecting ',' or ';' in php shell code on line 1