|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-03-04 11:50 UTC] nikic@php.net
-Assigned To:
+Assigned To: nikic
[2019-03-04 12:16 UTC] nikic@php.net
[2019-03-04 12:16 UTC] nikic@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 07:00:02 2025 UTC |
Description: ------------ If an inline assignment to append a value to an array is used as argument opcache passes the array instead of the assigned value to the function. This works as expected when opcache is disabled. Test script: --------------- <?php // a.php include('b.php'); function a() { var_dump($array = [], b($array[] = 'test')); } a(); -------- <?php // b.php function b($str) { return $str; } Expected result: ---------------- array(0) { } string(4) "test" Actual result: -------------- array(0) { } array(1) { [0]=> string(4) "test" }