3v4l.org

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