|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-07-31 12:45 UTC] cmb@php.net
-Package: SPL related
+Package: Scripting Engine problem
[2019-07-31 12:45 UTC] cmb@php.net
[2019-07-31 15:24 UTC] nikic@php.net
[2019-08-01 08:14 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2019-08-01 08:14 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 12 22:00:01 2025 UTC |
Description: ------------ Let some object implements ArrayAccess and its offsetGet() returns an array. Then if we use the accessed result as an unpacked (with ... token) argument we're getting an error: Indirect modification of overloaded element of class@anonymous has no effect. Test script: --------------- $object = new class implements ArrayAccess { public function offsetGet($offset) { return [1, 2]; } public function offsetExists($offset) { return true; } public function offsetUnset($offset) {} public function offsetSet($offset, $value) {} }; $x = max(...$object[0]); Expected result: ---------------- $x contains 2. Actual result: -------------- Error: Indirect modification of overloaded element of class@anonymous has no effect