3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); define('ITERATIONS', 2000000); function foo($a) { return; } $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.3.10.0170.29816.05
7.3.00.0100.28816.57
7.2.130.0070.30916.57
7.2.120.0100.31416.56
7.2.110.0130.33416.77
7.2.100.0100.32616.59
7.2.90.0100.36216.58
7.2.80.0130.36016.77
7.2.70.0170.32916.61
7.2.60.0200.35116.61
7.2.50.0030.34616.71
7.2.40.0160.35516.50
7.2.30.0160.34517.13
7.2.20.0120.32816.61
7.2.10.0000.34716.28
7.2.00.0050.25718.06
7.1.250.0070.52615.41
7.1.70.0030.26417.08
7.1.60.0070.25719.82
7.1.50.0030.28216.64
7.1.00.0030.37722.28
7.0.200.0900.22416.69
7.0.140.0100.38322.09
7.0.100.0100.28320.02
7.0.90.0070.28319.91
7.0.80.0070.29019.93
7.0.70.0170.27019.96
7.0.60.0170.23719.89
7.0.50.0000.20020.35
7.0.40.0100.28020.13
7.0.30.0100.30020.12
7.0.20.0030.31320.13
7.0.10.0030.29020.07
7.0.00.0100.28020.02
5.6.280.0031.77320.89
5.6.250.0071.70320.57
5.6.240.0031.69720.67
5.6.230.1801.62320.56
5.6.220.0071.74720.65
5.6.210.0201.65320.60
5.6.200.0071.64020.95
5.6.190.0031.46021.09
5.6.180.0071.61721.06
5.6.170.0101.65321.18
5.6.160.0101.60320.95
5.6.150.0101.63020.94
5.6.140.1631.66721.00
5.6.130.0131.59021.04
5.6.120.0131.64321.17
5.6.110.0071.64721.01
5.6.100.0031.53721.16
5.6.90.0071.67321.09
5.6.80.0101.57320.44
5.6.70.0031.47020.48
5.6.60.0031.53020.28
5.6.50.0101.69020.50
5.6.40.0171.60320.39
5.6.30.0031.70320.42
5.6.20.0131.59020.46
5.6.10.0071.65720.46
5.6.00.0031.62720.30
5.5.380.0001.53020.50
5.5.370.0131.63020.47
5.5.360.0231.71020.34
5.5.350.0031.53320.48
5.5.340.0031.43720.83
5.5.330.0101.58720.73
5.5.320.0031.63320.83
5.5.310.0031.76320.84
5.5.300.0101.71020.87
5.5.290.0071.68320.80
5.5.280.0071.65720.78
5.5.270.0101.63320.87
5.5.260.0101.62720.88
5.5.250.0071.66320.62
5.5.240.0101.63020.22
5.5.230.0031.64020.16
5.5.220.0071.62720.14
5.5.210.0031.71720.14
5.5.200.0071.63320.24
5.5.190.0031.68020.11
5.5.180.0101.51020.12
5.5.160.0131.67020.11
5.5.150.0131.63719.99
5.5.140.1931.56320.23
5.5.130.0101.65320.27
5.5.120.0101.60320.27
5.5.110.0001.73720.25
5.5.100.0031.48720.07
5.5.90.0101.47320.09
5.5.80.0031.48020.01
5.5.70.0071.72320.12
5.5.60.0071.87720.06
5.5.50.0001.64020.13
5.5.40.0131.65020.14
5.5.30.0001.64020.15
5.5.20.0001.64320.02
5.5.10.0071.59720.13
5.5.00.0071.62720.04
5.4.450.0071.67719.56
5.4.440.0071.54319.37
5.4.430.0031.88319.17
5.4.420.0071.63319.27
5.4.410.2131.60719.24
5.4.400.0031.51319.06
5.4.390.0031.63319.23
5.4.380.1801.52719.13
5.4.370.0101.64019.23
5.4.360.0001.59319.12
5.4.350.0101.54719.03
5.4.340.0101.63319.18
5.4.320.0001.66019.05
5.4.310.0071.64019.04
5.4.300.0171.62719.21
5.4.290.0071.73719.16
5.4.280.0131.52319.23
5.4.270.0101.48719.12
5.4.260.0001.61719.13
5.4.250.0101.79319.08
5.4.240.0101.52019.11
5.4.230.0001.48318.84
5.4.220.0071.59319.12
5.4.210.0031.62719.11
5.4.200.0071.78018.94
5.4.190.0031.64318.91
5.4.180.0031.65319.11
5.4.170.0071.62719.04
5.4.160.0071.88019.16
5.4.150.0031.65719.21
5.4.140.0071.63016.41
5.4.130.0071.68716.42
5.4.120.0031.65716.32
5.4.110.0071.45016.50
5.4.100.0071.57716.47
5.4.90.0071.55016.48
5.4.80.0031.58716.34
5.4.70.0031.73016.51
5.4.60.0031.65016.31
5.4.50.0001.61716.48
5.4.40.0031.67016.37
5.4.30.0031.61316.32
5.4.20.0101.59316.47
5.4.10.0031.60716.33
5.4.00.0031.54315.89
5.3.290.0102.17314.66
5.3.280.0002.13714.73
5.3.270.0032.29714.52
5.3.260.0072.25714.74
5.3.250.0032.20314.74
5.3.240.0002.16714.60
5.3.230.0072.16714.53
5.3.220.0072.19314.62
5.3.210.0032.20314.57
5.3.200.0072.12714.50
5.3.190.0001.97014.63
5.3.180.0032.04014.62
5.3.170.0032.01314.62
5.3.160.0132.27014.54
5.3.150.0072.13014.65
5.3.140.0102.16714.61
5.3.130.0072.21014.58
5.3.120.0102.17714.54
5.3.110.0172.17714.68
5.3.100.0102.18014.01
5.3.90.0072.33714.03
5.3.80.0032.38314.00
5.3.70.0072.23014.03
5.3.60.0072.11714.08
5.3.50.0002.14713.84
5.3.40.0072.20014.08
5.3.30.0002.10713.79
5.3.20.0102.18013.76
5.3.10.0032.25013.80
5.3.00.0032.17313.65
5.2.170.0102.41010.91
5.2.160.0332.41010.78
5.2.150.0032.48011.48
5.2.140.0032.40311.48
5.2.130.0302.35710.86
5.2.120.0272.41710.88
5.2.110.0102.39310.69
5.2.100.0002.44311.48
5.2.90.0202.39710.86
5.2.80.0172.43010.85
5.2.70.0202.41010.86
5.2.60.0002.39311.48
5.2.50.0072.37710.78
5.2.40.0302.39710.62
5.2.30.0232.42310.75
5.2.20.0172.41310.78
5.2.10.0202.42310.68
5.2.00.0002.30711.48
5.1.60.0132.3879.77
5.1.50.0002.37311.48
5.1.40.0002.38711.48
5.1.30.0202.37710.18
5.1.20.0332.33310.21
5.1.10.0102.34711.48
5.1.00.0032.14011.48
5.0.50.0102.4278.23
5.0.40.0032.4438.20
5.0.30.0232.3638.07
5.0.20.0202.4108.05
5.0.10.0132.3977.96
5.0.00.0072.4377.93
4.4.90.0032.49711.48
4.4.80.0032.49711.48
4.4.70.0002.50011.48
4.4.60.0102.49011.48
4.4.50.0032.49711.48
4.4.40.0032.49711.48
4.4.30.0032.49711.48
4.4.20.0002.50011.48
4.4.10.0132.48711.48
4.4.00.0002.50011.48
4.3.110.0032.49711.48
4.3.100.0032.49711.48
4.3.90.0002.50011.48
4.3.80.0032.49711.48
4.3.70.0002.50011.48
4.3.60.0002.50011.48
4.3.50.0002.50011.48
4.3.40.0032.49711.48
4.3.30.0002.50011.48
4.3.20.0002.50011.48
4.3.10.0032.49710.98
4.3.00.0032.49710.98

preferences:
34.9 ms | 401 KiB | 5 Q