|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-04-08 21:52 UTC] jani@php.net
-Package: Feature/Change Request
+Package: Scripting Engine problem
[2014-10-12 14:36 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2014-10-12 14:36 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 08:00:02 2025 UTC |
Description: ------------ Assignments which should otherwise evaluate to references of the l-value do not properly do so in some situations, but do in others. Reproduce code: --------------- 1. echo ($x = 5)--; 2. echo ($x = Array(3))[0]; 3. echo ($x = ($y = 3)); I presume this is also related: 4. function foo(){ return Array(3); } echo (foo())[0]; Expected result: ---------------- 1. 4 2. 3 3. 3 4. 3 Actual result: -------------- 1. Parser chokes on T_DEC 2. Parser chokes on [ 3. Works correctly, 3 is assigned to $x and $y and printed. 4. Parser chokes on [