3v4l.org

run code in 300+ PHP versions simultaneously
<?php $final = array(); $names = ['James', 'Mike', 'Liam', 'Shantel', 'Harry']; $colors = ['Green', 'Blue', 'Yellow', 'Purple', 'Red']; foreach($names as $i => $key) { $final[$key] = $colors[$i]; } var_dump($final);

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)
8.3.70.0150.00316.73
8.3.60.0090.00616.48
8.3.50.0090.00620.09
8.3.40.0120.00918.73
8.3.30.0070.00719.21
8.3.20.0040.00424.18
8.3.10.0030.00624.66
8.3.00.0000.00726.16
8.2.180.0150.00025.92
8.2.170.0160.00319.09
8.2.160.0090.00622.96
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0040.00426.16
8.2.110.0090.00019.32
8.2.100.0070.00417.91
8.2.90.0040.00419.21
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0000.00817.68
8.2.50.0030.01018.07
8.2.40.0030.00618.34
8.2.30.0000.00818.12
8.2.20.0040.00420.46
8.2.10.0040.00418.12
8.2.00.0070.00019.30
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0070.00323.97
8.1.230.0070.00420.97
8.1.220.0060.00318.77
8.1.210.0050.00320.73
8.1.200.0060.00317.36
8.1.190.0090.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00418.52
8.1.160.0000.00718.82
8.1.150.0030.00618.50
8.1.140.0000.00817.50
8.1.130.0000.00718.88
8.1.120.0030.00317.52
8.1.110.0000.00717.39
8.1.100.0080.00017.38
8.1.90.0040.00417.43
8.1.80.0000.00717.45
8.1.70.0070.00017.40
8.1.60.0080.00817.48
8.1.50.0260.00017.45
8.1.40.0250.00517.36
8.1.30.0210.00617.47
8.1.20.0190.00617.63
8.1.10.0200.00717.50
8.1.00.0150.00917.46
8.0.300.0000.00819.97
8.0.290.0040.00417.05
8.0.280.0000.00718.34
8.0.270.0000.00716.82
8.0.260.0040.00418.34
8.0.250.0030.00316.94
8.0.240.0000.00716.82
8.0.230.0030.00316.81
8.0.220.0000.00716.89
8.0.210.0000.00716.77
8.0.200.0000.00716.93
8.0.190.0060.00316.96
8.0.180.0220.00016.87
8.0.170.0110.01116.79
8.0.160.0160.00516.84
8.0.150.0220.00016.80
8.0.140.0150.00816.75
8.0.130.0250.00316.88
8.0.120.0230.00016.90
8.0.110.0120.00916.86
8.0.100.0200.00416.87
8.0.90.0170.00616.77
8.0.80.0190.00216.84
8.0.70.0160.00716.91
8.0.60.0190.00316.81
8.0.50.0200.00316.67
8.0.30.0170.00716.92
8.0.20.0100.01116.97
8.0.10.0160.00317.02
7.4.330.0050.00015.55
7.4.320.0000.00616.42
7.4.300.0060.00016.48
7.4.290.0160.00616.47
7.4.280.0160.01316.52
7.4.270.0190.00816.49
7.4.260.0130.00716.57
7.4.250.0160.00916.38
7.4.240.0270.00016.59
7.4.230.0200.00516.49
7.4.220.0170.00416.48
7.4.210.0170.00416.48
7.4.200.0170.00416.57
7.4.190.0190.00516.66
7.4.180.0100.01016.53
7.4.160.0180.00716.41
7.4.150.0090.01316.58
7.4.140.0160.00816.47
7.4.130.0130.01016.36
7.4.120.0190.00416.51
7.4.110.0210.00416.31
7.4.100.0140.00416.43
7.4.90.0070.01316.50
7.4.80.0110.01216.36
7.4.70.0200.00316.24
7.4.60.0080.01116.39
7.4.50.0110.00816.44
7.4.40.0160.00516.30
7.4.30.0110.00816.41
7.4.20.0160.00516.38
7.4.10.0140.00516.45
7.4.00.0120.00616.51

preferences:
43.67 ms | 401 KiB | 5 Q