3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create an array with 0 value $array = array(0); // Iterate over the array, var_dump each value // At the same time, set the next value to "lolcats" foreach ($array as $key => &$val) { var_dump($val); $array[uniqid()] = "lolcats"; } // Finally var_dump the $array var_dump($array);

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.0260.01018.40
7.3.00.0330.00318.80
7.2.130.0280.00316.86
7.2.120.1760.01916.13
7.2.110.0830.00016.66
7.2.100.0470.00318.63
7.2.90.0280.00516.92
7.2.80.0300.01018.83
7.2.70.0270.01718.41
7.2.60.0250.01918.83
7.2.50.0110.03018.70
7.2.40.0390.00416.93
7.2.30.0260.00716.75
7.2.20.0160.02318.89
7.2.10.0370.00318.97
7.2.00.0170.01219.89
7.1.250.0700.01514.44
7.1.70.0090.00917.13
7.1.60.0150.02619.52
7.1.50.0150.02416.96
7.1.00.0100.09022.36
7.0.200.0180.00915.43
7.0.100.0530.07720.48
7.0.90.0330.08020.43
7.0.80.0370.09320.41
7.0.70.0470.08320.35
7.0.60.0400.08320.27
7.0.50.0430.07320.87
7.0.40.0200.08020.12
7.0.30.0130.08320.11
7.0.20.0200.08320.13
7.0.10.0170.04720.09
7.0.00.0070.06720.08
5.6.280.0000.03321.09
5.6.250.0100.08020.68
5.6.240.0170.07020.54
5.6.230.0030.08720.62
5.6.220.0000.04720.73
5.6.210.0170.04720.73
5.6.200.0100.08021.18
5.6.190.0130.07721.11
5.6.180.0170.08321.07
5.6.170.0100.08720.95
5.6.160.0100.07021.10
5.6.150.0030.06021.06
5.6.140.0030.08020.98
5.6.130.0170.05321.04
5.6.120.0130.08021.07
5.6.110.0030.09021.10
5.6.100.0070.08321.00
5.6.90.0030.06321.11
5.6.80.0070.07720.51
5.6.70.0030.08320.43
5.6.60.0070.08020.32
5.6.50.0030.06020.44
5.6.40.0170.06720.41
5.6.30.0070.07320.38
5.6.20.0100.07320.27
5.6.10.0030.08320.37
5.6.00.0070.07720.38
5.5.380.0100.06720.50
5.5.370.0100.07720.35
5.5.360.0030.08020.48
5.5.350.0170.07720.39
5.5.340.0070.04320.79
5.5.330.0100.04020.88
5.5.320.0100.05020.88
5.5.310.0030.08720.88
5.5.300.0100.08020.77
5.5.290.0130.08020.72
5.5.280.0130.07320.93
5.5.270.0100.08320.81
5.5.260.0070.08020.75
5.5.250.0100.08020.71
5.5.240.0070.07020.28
5.5.230.0030.08020.20
5.5.220.0000.07720.23
5.5.210.0130.07720.29
5.5.200.0130.07320.20
5.5.190.0130.07320.22
5.5.180.0070.08020.26
5.5.160.0070.07319.99
5.5.150.0130.07320.21
5.5.140.0070.05720.12
5.5.130.0070.08319.99
5.5.120.0170.06720.14
5.5.110.0030.08320.19
5.5.100.0130.07319.95
5.5.90.0100.07320.14
5.5.80.0030.08320.04
5.5.70.0100.08320.08
5.5.60.0100.07020.05
5.5.50.0070.07719.93
5.5.40.0030.08020.14
5.5.30.0100.07320.09
5.5.20.0100.07719.92
5.5.10.0030.08019.97
5.5.00.0100.07320.03

preferences:
29.61 ms | 403 KiB | 5 Q