3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { public function bar($x,$y){ return $x*y; } } $s = microtime(true); $foo = new foo(); for($x = 0; $x < 10000; $x++ ){ call_user_func(array($foo, 'bar'), 10,20); } echo round(microtime(true) - $s,5)."\n"; $s = microtime(true); $foo = new foo(); $met = 'bar'; for($x = 0; $x < 10000; $x++ ){ $foo->$bar(10,20); } echo round(microtime(true) - $s,5)."\n";

Abusive script

This script was stopped while abusing our resources