3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_a = range(0, 1000000); $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $_a[$i] = $_a[$i]; } echo microtime(true) - $ts; echo '------------------'; $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo '------------------'; $ts = microtime(true); $a = range(0, 1000000); for($i = 0, $c = count($a); $i < $c; $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo '------------------';

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.0100.01050.86
7.1.70.0230.02348.98
7.1.60.0140.02949.28
7.1.50.0100.03048.81
7.1.00.0100.08354.36
7.0.200.0910.01048.36
7.0.140.0070.08353.96
7.0.60.0200.07350.39
7.0.50.0170.09048.20
7.0.40.0200.04750.28
7.0.30.0600.08750.11
7.0.20.1030.08350.39
7.0.10.0230.06050.17
7.0.00.0200.09350.32
5.6.280.0170.12385.50
5.6.210.0270.09085.15
5.6.200.0230.08382.70
5.6.190.0270.12784.97
5.6.180.0430.07085.10
5.6.170.0470.10784.96
5.6.160.0170.09084.97
5.6.150.0270.11082.80
5.6.140.0300.11382.71
5.6.130.0200.07782.66
5.6.120.0400.07085.68
5.6.110.0330.12085.63
5.6.100.0270.13085.65
5.6.90.0370.11085.57
5.6.80.0130.11085.11
5.5.350.0370.08085.07
5.5.340.0470.07082.63
5.5.330.0200.07084.76
5.5.320.0870.06784.65
5.5.310.0270.07384.86
5.5.300.0300.12382.52
5.5.290.0430.09082.61
5.5.280.0100.09385.62
5.5.270.0270.07385.43
5.5.260.0170.08785.51
5.5.250.0330.09085.32
5.5.240.0170.07384.80
5.4.450.0430.12083.72
5.4.440.0630.10083.83
5.4.430.0630.10383.68
5.4.420.0730.05784.07
5.4.410.0600.09783.70
5.4.400.0470.12083.51
5.4.390.0430.07083.51
5.4.380.0600.09083.82
5.4.370.0330.08083.66
5.4.360.0470.11383.82
5.4.350.0430.07083.46
5.4.340.0470.06783.82
5.4.320.0470.12083.64
5.4.310.0430.07383.79
5.4.300.0670.08083.64
5.4.290.0500.06783.81
5.4.280.0730.07083.50
5.4.270.0530.08783.70
5.4.260.0830.06383.79
5.4.250.0670.06783.63
5.4.240.0570.06083.65
5.4.230.0500.06083.45
5.4.220.0470.06783.50
5.4.210.0570.09083.60
5.4.200.0530.07383.50
5.4.190.0370.07383.58
5.4.180.0470.09083.34
5.4.170.0570.07783.58
5.4.160.0430.07083.79
5.4.150.0530.09383.58
5.4.140.0570.08781.16
5.4.130.0800.05381.16
5.4.120.0570.09780.99
5.4.110.0500.07080.82
5.4.100.0500.11381.04
5.4.90.0530.07380.68
5.4.80.0530.11381.02
5.4.70.0530.10381.00
5.4.60.0700.09380.98
5.4.50.0330.08080.76
5.4.40.0500.06081.06
5.4.30.0530.06080.98
5.4.20.0530.09780.98
5.4.10.0430.07780.64
5.4.00.0400.07080.50
5.3.290.0400.07777.68
5.3.280.0470.07377.75
5.3.270.0570.09077.73
5.3.260.0600.06377.66
5.3.250.0500.06777.84
5.3.240.0670.09077.71
5.3.230.0470.06777.65
5.3.220.0500.10777.66
5.3.210.0500.06077.69
5.3.200.0570.09077.83
5.3.190.0570.10077.60
5.3.180.0330.11777.68
5.3.170.0370.06777.82
5.3.160.0770.07777.69
5.3.150.0430.06077.57
5.3.140.0530.10377.80
5.3.130.0430.08777.57
5.3.120.0430.06777.65
5.3.110.0400.11777.59
5.3.100.0400.10377.30
5.3.90.0400.11377.14
5.3.80.0370.08377.06
5.3.70.0700.09077.03
5.3.60.0470.12376.96
5.3.50.0530.10376.92
5.3.40.0530.05776.90
5.3.30.0570.09076.88
5.3.20.0470.06376.67
5.3.10.0530.12076.71
5.3.00.0500.06776.61
5.2.170.0470.10774.81
5.2.160.0500.10074.66
5.2.150.0630.08774.68
5.2.140.0370.06774.73
5.2.130.0530.07774.71
5.2.120.0400.06374.82
5.2.110.0500.10074.93
5.2.100.0400.08074.79
5.2.90.0300.07075.21
5.2.80.0400.10074.65
5.2.70.0530.09374.92
5.2.60.0370.11074.53
5.2.50.0500.08074.52
5.2.40.0430.11775.05
5.2.30.0430.08074.56
5.2.20.0370.08774.45
5.2.10.0470.07774.30
5.2.00.1930.817401.75
5.1.60.2771.010537.44
5.1.50.1901.027537.25
5.1.40.1701.213537.41
5.1.30.1800.983537.73
5.1.20.1601.110537.70
5.1.10.1631.233537.36
5.1.00.1631.023537.65
5.0.50.5431.627543.29
5.0.40.1301.767535.86
5.0.30.1131.560535.81
5.0.20.1731.853535.67
5.0.10.1271.550535.42
5.0.00.5031.700535.46
4.4.90.1471.783533.30
4.4.80.1531.583533.43
4.4.70.1401.640533.42
4.4.60.1401.573533.37
4.4.50.1801.570533.39
4.4.40.1601.597533.42
4.4.30.1372.067533.38
4.4.20.1832.283533.37
4.4.10.1301.543533.35
4.4.00.1331.627533.37
4.3.110.1531.593533.32
4.3.100.1901.580533.22
4.3.90.1831.557533.25
4.3.80.1401.637533.24
4.3.70.1931.560533.21
4.3.60.1701.540533.16
4.3.50.1931.597533.26
4.3.40.1401.597533.18
4.3.30.1731.583532.02
4.3.20.1471.660531.95
4.3.10.1801.550532.00
4.3.00.1471.510531.94

preferences:
36.01 ms | 400 KiB | 5 Q