3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $bar = 1; $func = (function ($foo) use ($bar) : bool { return $foo === $bar; }); var_dump($func(1)); var_dump($func(2));
Output for 7.0.0 - 7.2.0
bool(true) bool(false)
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting '{' in /in/pJBrC on line 5
Process exited with code 255.