|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-08-19 12:42 UTC] danack@php.net
-Status: Open
+Status: Not a bug
[2020-08-19 12:42 UTC] danack@php.net
[2020-08-19 13:15 UTC] tropicano at ukr dot net
[2020-08-19 13:40 UTC] danack@php.net
[2020-08-19 14:11 UTC] tropicano at ukr dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 07:00:02 2025 UTC |
Description: ------------ Not correct result in closure function. Please review and fix it. Test script: --------------- $x = 0; function main($func, $func2) { return $func($func2); } function callback_main($func3) { $data = 1; $func3($data); return $data; } echo main('callback_main', function (&$data) use ($x) { $data =& $x; $data = 2; } ); Expected result: ---------------- echo is: 1 Actual result: -------------- must be: 2