|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-07 20:33 UTC] colder@php.net
[2009-08-10 15:19 UTC] colder@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 18:00:01 2025 UTC |
Description: ------------ Calling var_dump() on a closure that references itself results in an infinite loop. Reproduce code: --------------- <?php $f = function () use (&$f) {}; var_dump($f); ?> Expected result: ---------------- object(Closure)#1 (1) { ["static"]=> array(1) { ["f"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["f"]=>RECURSION } } } } Actual result: -------------- object(Closure)#1 (1) { ["static"]=> array(1) { ["f"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["f"]=> &object(Closure)#1 (1) { ["static"]=> array(1) { ["f"]=> <repeats forever>