3v4l.org

run code in 300+ PHP versions simultaneously
<?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";

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)
7.2.100.1660.00614.41
7.2.90.2020.01014.48
7.2.80.1760.00014.32
7.2.70.2240.00714.56
7.2.60.1730.01014.96
7.2.50.2330.01314.85
7.2.40.1720.01014.89
7.2.30.2140.00614.58
7.2.20.1490.01614.96
7.2.10.0670.00014.79
7.2.00.1920.00614.87
7.1.220.1760.01013.89
7.1.210.1800.00013.43
7.1.200.2030.00713.69
7.1.190.2070.00613.73
7.1.180.1910.01313.74
7.1.170.2190.00713.37
7.1.160.2140.00713.61
7.1.150.1790.00713.52
7.1.140.1590.01613.77
7.1.130.0140.01413.48
7.1.120.1780.00013.80
7.1.110.1310.00313.88
7.1.100.1910.01013.69
7.1.90.0140.00713.55
7.1.80.1490.01013.82
7.1.70.1180.00613.71
7.1.60.1570.01031.85
7.1.50.0450.00031.70
7.1.40.1780.01731.61
7.1.30.1140.01631.93
7.1.20.0450.00731.64
7.1.10.2180.01013.82
7.1.00.0030.01913.63
7.0.310.2040.00713.37
7.0.300.2410.00713.64
7.0.290.1880.01013.54
7.0.280.1440.01313.43
7.0.270.0400.00613.58
7.0.260.0090.00913.56
7.0.250.0160.00613.05
7.0.240.0170.00713.48
7.0.230.1230.01013.49
7.0.220.0060.01213.55
7.0.210.1390.01113.37
7.0.200.1260.01313.50
7.0.190.1020.01313.59
7.0.180.0310.00713.37
7.0.170.0240.00413.46
7.0.160.1680.00013.64
7.0.150.1380.01013.67
7.0.140.0100.00713.60
7.0.130.0690.00613.38
7.0.120.0620.01113.60
7.0.110.0500.01013.58
7.0.100.1060.00713.61
7.0.90.0100.01013.61
7.0.80.0130.01013.30
7.0.70.1000.00013.54
7.0.60.0140.00513.37
7.0.50.0320.00613.30
7.0.40.1430.01713.74
7.0.30.0370.00813.71
7.0.20.0330.00613.46
7.0.10.0610.01213.43
7.0.00.1410.00713.39
5.6.380.0180.00014.18
5.6.370.0030.01314.18
5.6.360.0000.01613.66
5.6.350.0150.00413.84
5.6.340.0100.00714.11
5.6.330.0200.00014.02
5.6.320.0060.01214.22
5.6.310.0070.01114.34
5.6.300.0040.01514.06
5.6.290.0170.00414.45
5.6.280.0060.01214.35
5.6.270.0130.00814.36
5.6.260.0040.01214.24
5.6.250.0090.01214.45
5.6.240.0140.00714.43
5.6.230.0150.00414.32
5.6.220.0030.01314.52
5.6.210.0070.01114.20
5.6.200.0080.01514.37
5.6.190.0110.00714.40
5.6.180.0110.00614.21
5.6.170.0090.00914.21
5.6.160.0050.01014.14
5.6.150.0130.00314.17
5.6.140.0100.00314.27
5.6.130.0000.01314.20
5.6.120.0060.00913.85
5.6.110.0090.00914.11
5.6.100.0080.00814.21
5.6.90.0070.00713.86
5.6.80.0070.01014.26
5.6.70.0090.00914.23
5.6.60.0120.00814.26
5.6.50.0120.01214.29
5.6.40.0150.00514.05
5.6.30.0050.01414.28
5.6.20.0140.00714.28
5.6.10.0120.01214.20
5.6.00.0130.01114.13
5.5.380.0090.00312.33
5.5.370.0070.00712.33
5.5.360.0030.01112.33
5.5.350.0070.00712.33
5.5.340.0120.00312.33
5.5.330.0070.01112.33
5.5.320.0110.00512.33
5.5.310.0080.00812.33
5.5.300.0000.01112.33
5.5.290.0060.00612.33
5.5.280.0100.00712.33
5.5.270.0110.00612.33
5.5.260.0110.00012.33
5.5.250.0040.00912.33
5.5.240.0020.01212.33
5.5.230.0070.00712.33
5.5.220.0120.00912.33
5.5.210.0120.00712.33
5.5.200.0040.01312.33
5.5.190.0140.00412.33
5.5.180.0100.01012.33
5.5.170.0160.00714.00
5.5.160.0120.00512.33
5.5.150.0110.00812.33
5.5.140.0110.01012.33
5.4.450.0060.00912.33
5.4.440.0090.01312.33
5.4.430.0120.00612.33
5.4.420.0050.01012.33
5.4.410.0060.01212.33
5.4.400.0080.00812.33
5.4.390.0030.01112.33
5.4.380.0030.01112.33
5.4.370.0060.00912.33
5.4.360.0150.00012.33
5.4.350.0070.01112.33
5.4.340.0130.01112.33
5.4.330.0110.00712.33
5.4.320.0080.00412.33
5.4.310.0060.00612.33
5.4.300.0060.01412.33
5.3.290.0120.00412.33

preferences:
42.58 ms | 400 KiB | 5 Q