3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { public function method() { } } $obj = new Test; $ref = new ReflectionMethod($obj, 'method'); $closure = $ref->getClosure($obj;) echo "Starting loop..."; $start = microtime(true); for ($i=0; $i<1e6; $i++) { $closure(array()); } echo "Took ", number_format((microtime(true)-$start)*1e3, 3), " ms";
Output for 5.3.0 - 5.4.13
Parse error: syntax error, unexpected ';' in /in/B7g6u on line 9
Process exited with code 255.