3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); define('ITERATIONS', 2000000); $start = microtime(true); for ($i=0; $i < ITERATIONS; ++$i) { foo(1); $foo = 'foo'; $foo(1); call_user_func('foo', 1); call_user_func_array('foo', array(1)); } $stop = microtime(true); echo "Test name: " . ($stop - $start) . " seconds". PHP_EOL;

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.00.0000.01519.40
7.1.70.0000.00716.99
7.1.60.0180.00719.82
7.1.50.0100.01316.64
7.1.00.0070.07322.33
7.0.200.0030.00816.72
7.0.140.0000.07721.99
7.0.60.0130.07319.86
7.0.50.0000.07317.84
7.0.40.0130.03719.98
7.0.30.0570.07020.21
7.0.20.0130.06320.30
7.0.10.0230.05020.00
7.0.00.0070.08020.01
5.6.280.0000.07321.12
5.6.210.0100.08020.64
5.6.200.0170.04318.22
5.6.190.0030.04320.61
5.6.180.0270.07020.38
5.6.170.0330.06320.48
5.6.160.0100.08020.33
5.6.150.0100.04718.22
5.6.140.0200.05018.09
5.6.130.0100.07718.14
5.6.120.0170.08021.04
5.6.110.0000.06020.96
5.6.100.0070.08321.08
5.6.90.0030.06721.09
5.6.80.0200.07020.35
5.6.70.4430.03720.34
5.5.350.0030.03320.43
5.5.340.0030.04018.02
5.5.330.0170.06320.23
5.5.320.0230.06020.20
5.5.310.0330.07320.28
5.5.300.0070.03718.01
5.5.290.0030.04717.95
5.5.280.0000.07720.80
5.5.270.0000.04320.67
5.5.260.0100.05320.61
5.5.250.0170.07020.68
5.5.240.0100.07720.34
5.4.450.0900.08019.49
5.4.440.0800.08019.63
5.4.430.0030.06019.35
5.4.420.0070.05719.46
5.4.410.0270.06318.88
5.4.400.0430.05318.68
5.4.390.0230.06018.54
5.4.380.0300.05318.56
5.4.370.0130.03318.56
5.4.360.0070.04318.63
5.4.350.0050.03411.98
5.4.340.0060.03411.97
5.4.320.0060.04012.46
5.4.310.0040.04212.45
5.4.300.0090.03412.46
5.4.290.0070.04012.45
5.4.280.0040.03712.35
5.4.270.0230.06018.65
5.4.260.0130.05718.80
5.4.250.0130.06318.79
5.4.240.0030.07718.89
5.4.230.0100.05319.03
5.4.220.0170.07318.88
5.4.210.0070.06318.83
5.4.200.0100.05018.94
5.4.190.0070.08018.99
5.4.180.0130.05318.91
5.4.170.0200.06719.02
5.4.160.0300.04718.76
5.4.150.0100.08718.71
5.4.140.0030.06016.48
5.4.130.0130.06016.28
5.4.120.0130.04716.27
5.4.110.0100.06716.36
5.4.100.0100.06016.50
5.4.90.0100.04716.23
5.4.80.0130.05316.32
5.4.70.0230.06016.23
5.4.60.0100.05016.43
5.4.50.0200.05716.46
5.4.40.0100.05016.45
5.4.30.0200.07716.38
5.4.20.0030.08016.32
5.4.10.0100.05716.46
5.4.00.0230.05015.89
5.3.290.0050.04012.80
5.3.280.0170.05314.49
5.3.270.0270.04714.62
5.3.260.0070.05714.44
5.3.250.0030.08014.60
5.3.240.0070.07014.62
5.3.230.0270.06014.48
5.3.220.0170.04014.43
5.3.210.0070.08014.57
5.3.200.0100.07314.59
5.3.190.0100.07314.71
5.3.180.0200.03714.60
5.3.170.0130.05714.58
5.3.160.0100.05314.56
5.3.150.0200.05014.40
5.3.140.0100.07014.42
5.3.130.0170.07314.55
5.3.120.0030.08014.56
5.3.110.0170.05014.25
5.3.100.0130.05314.05
5.3.90.0130.07314.11
5.3.80.0130.06313.86
5.3.70.0130.05313.95
5.3.60.0070.07714.15
5.3.50.0000.07713.96
5.3.40.0100.05013.86
5.3.30.0200.06013.82
5.3.20.0130.06313.38
5.3.10.0070.05013.64
5.3.00.0200.04313.66
5.2.170.0130.04311.14
5.2.160.0000.06011.15
5.2.150.0070.06011.29
5.2.140.0100.04311.02
5.2.130.0100.05711.03
5.2.120.0100.05010.93
5.2.110.0130.05010.93
5.2.100.0100.04011.21
5.2.90.0030.04311.00
5.2.80.0070.05310.94
5.2.70.0100.03711.10
5.2.60.0070.05710.97
5.2.50.0000.05010.78
5.2.40.0070.05710.93
5.2.30.0000.04710.89
5.2.20.0170.04010.96
5.2.10.0070.05010.91
5.2.00.0170.03310.93
5.1.60.0030.0539.99
5.1.50.0170.0379.95
5.1.40.0070.04310.05
5.1.30.0030.04310.41
5.1.20.0070.03710.57
5.1.10.0070.04010.25
5.1.00.0030.03710.16
5.0.50.0070.0308.50
5.0.40.0100.0278.50
5.0.30.0070.0478.28
5.0.20.0100.0378.16
5.0.10.0070.0338.36
5.0.00.0070.0478.30
4.4.90.0130.0176.28
4.4.80.0070.0276.28
4.4.70.0000.0236.28
4.4.60.0070.0276.28
4.4.50.0000.0306.28
4.4.40.0000.0376.28
4.4.30.0000.0336.28
4.4.20.0030.0236.28
4.4.10.0030.0306.28
4.4.00.0030.0336.28
4.3.110.0000.0336.28
4.3.100.0000.0236.26
4.3.90.0030.0306.24
4.3.80.0030.0436.18
4.3.70.0000.0306.15
4.3.60.0070.0176.15
4.3.50.0070.0306.11
4.3.40.0000.0476.07
4.3.30.0030.0236.06
4.3.20.0030.0306.04
4.3.10.0000.0276.03
4.3.00.0270.0236.71

preferences:
34.78 ms | 401 KiB | 5 Q