|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-15 15:59 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2011-11-15 15:59 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 06:00:01 2025 UTC |
Description: ------------ my configure line was: ./configure --prefix /usr/local/php/5.3.2 --disable-libxml --disable-dom --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear Test script: --------------- <?php $total = 0; f(function ($x) use (&$total) { $total += $x; }, function () use ($total) {}); var_dump($total); $total = 0; f(function ($x) use (&$total) { $total += $x; }); var_dump($total); function f($g) { foreach (range(1, 10) as $x) $g($x); } Expected result: ---------------- The following 2 lines should be output by the script: int(55) int(55) Actual result: -------------- The script outputs the following 2 lines: int(0) int(55)