3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function f($x) { echo $x; } $funs = array(); for ($i=0; $i<10; $i++) { $funs[] = f($i); } for ($i=0; $i<10; $i++) { $g = $funs[$i]; //$g(); }
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0123456789