3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $comething = 42; $closure = function &(string $str) use (&$something) : int { return strlen($str) + $something; } echo $closure("hello");
based on BYiRF
Output for 7.0.0
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/IvHgT on line 7
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Parse error: syntax error, unexpected ':', expecting '{' in /in/IvHgT on line 3
Process exited with code 255.