3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function bar($x,$y){ return $x*$y; } public static function met1(){ $met = $bar; //return static:: } } $s = microtime(true); for($x = 0; $x < 10000; $x++ ){ $a = is_callable(array('foo', 'bar')); } echo round(microtime(true) - $s,5)."\n"; $s = microtime(true); for($x = 0; $x < 10000; $x++ ){ $a = method_exists('foo', 'bar'); } echo round(microtime(true) - $s,5)."\n"; $s = microtime(true); $met = array('foo', 'bar'); for($x = 0; $x < 10000; $x++ ){ $a = $met instanceof \Callable; } echo round(microtime(true) - $s,5)."\n";

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.170.0180.04112.39
5.4.160.0180.04112.38
5.4.150.0200.06912.38
5.4.140.0130.04512.07
5.4.130.0140.04412.05
5.4.120.0160.04012.01
5.4.110.0190.03912.01
5.4.100.0150.04412.01
5.4.90.0180.04112.01
5.4.80.0150.04212.01
5.4.70.0160.05412.01
5.4.60.0180.06712.01
5.4.50.0150.04112.01
5.4.40.0150.04012.00
5.4.30.0130.04511.99
5.4.20.0150.04111.99
5.4.10.0150.04211.99
5.4.00.0120.04311.48
5.3.290.0070.04812.80
5.3.280.0080.06212.71
5.3.270.0220.06412.72
5.3.260.0130.05512.72
5.3.250.0150.05312.72
5.3.240.0190.04912.72
5.3.230.0210.05012.71
5.3.220.0280.07012.68
5.3.210.0160.05312.68
5.3.200.0150.05412.68
5.3.190.0180.05212.68
5.3.180.0160.05312.68
5.3.170.0140.05512.68
5.3.160.0140.05612.67
5.3.150.0260.05812.67
5.3.140.0160.05412.66
5.3.130.0140.05612.66
5.3.120.0190.04912.66
5.3.110.0150.05312.66
5.3.100.0140.05412.14
5.3.90.0180.04912.13
5.3.80.0130.05612.11
5.3.70.0180.05112.11
5.3.60.0130.05612.10
5.3.50.0210.06512.04
5.3.40.0170.05112.04
5.3.30.0160.05112.01
5.3.20.0120.05511.79
5.3.10.0160.06411.75
5.3.00.0160.05011.73

preferences:
35.63 ms | 400 KiB | 5 Q