3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class MyClosure extends \Closure { public static function __set_state(array $array) { echo 'function(){ echo 'hi';}'; } } $closure = new MyClosure(); echo (string) $closure;
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'hi' (T_STRING), expecting ',' or ';' in /in/SWqOu on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/SWqOu on line 7
Process exited with code 255.