3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $outer = function () { echo "Outer"; $times = 0; $inner = function() use ($times){ echo "Inner : ${times}"; if ( $times <= 2 ){ $times++; } } return $inner; } $inner = $outer(); $inner(); ?>
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/YHcD9 on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_RETURN in /in/YHcD9 on line 14
Process exited with code 255.