|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-11-04 14:27 UTC] johannes@php.net
-Status: Open
+Status: Not a bug
[2013-11-04 14:27 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 08:00:01 2026 UTC |
Description: ------------ use() do not work with array_walk[_recursive] Test script: --------------- <?php $a=['a'=>'p','b'=>['c'=>'a','d'=>'s'],'e'=>'s']; $c=0;array_walk($a,function()use($c){$c++;}); $r='';array_walk_recursive($a,function($v)use($r){$r.=$v;}); print($c.'/'.$r); // 3/pass ?> Expected result: ---------------- 3/pass Actual result: -------------- 0/