3v4l.org

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