|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-03-12 13:35 UTC] cmb@php.net
[2020-01-08 13:43 UTC] nikic@php.net
-Assigned To:
+Assigned To: nikic
[2020-03-03 11:02 UTC] nikic@php.net
-Status: Assigned
+Status: Closed
[2020-03-03 11:02 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 16:00:01 2025 UTC |
Description: ------------ As of PHP 5.6 it is possible to write "foo"[0]. However, if the string uses interpolation this does not work and leads to a parse error. Test script: --------------- <?php $bar = "bar"; var_dump("foo$bar"[0]); Expected result: ---------------- string(1) "f" Actual result: -------------- Parse error: syntax error, unexpected '[', expecting ',' or ')'