3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $double = function ($a){ return $a * 2; } // range $numbers = range(1, 5); $new_numbers = array_map($double, $numbers); print implode(' ', $new_numbers);
Output for 5.4.0 - 5.4.18
Parse error: syntax error, unexpected '$numbers' (T_VARIABLE) in /in/s7NDd on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/s7NDd on line 8
Process exited with code 255.