3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = ['a' => 0, 'c' => 1, 'e' => 2]; $a2 = ['b' => 3, 'd' => 4, 'f' => 5]; $result = []; while($a1 && $a2) { $result += array_splice($a1, 0, 1) + array_splice($a2, 0, 1); } var_export($result);

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.0070.00716.58
8.3.60.0070.00716.63
8.3.50.0100.00720.16
8.3.40.0140.00719.07
8.3.30.0080.00818.91
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.190.0180.00416.58
8.2.180.0150.00625.92
8.2.170.0070.00719.13
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0090.00022.26
8.2.100.0040.00818.03
8.2.90.0060.00317.88
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0050.00317.75
8.2.50.0060.00317.98
8.2.40.0000.00717.84
8.2.30.0090.00018.13
8.2.20.0000.00720.43
8.2.10.0040.00417.75
8.2.00.0000.00719.36
8.1.280.0150.00025.92
8.1.270.0060.00322.14
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00621.78
8.1.230.0030.00922.81
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0040.00417.62
8.1.160.0000.00818.89
8.1.150.0040.00418.59
8.1.140.0000.00717.35
8.1.130.0000.00718.93
8.1.120.0000.00817.36
8.1.110.0040.00417.37
8.1.100.0030.00317.36
8.1.90.0020.00517.34
8.1.80.0040.00417.36
8.1.70.0030.00317.40
8.1.60.0060.00317.57
8.1.50.0000.00817.48
8.1.40.0000.00817.41
8.1.30.0070.00317.68
8.1.20.0160.00817.63
8.1.10.0120.01217.35
8.1.00.0100.00717.32
8.0.300.0040.00419.72
8.0.290.0050.00216.75
8.0.280.0070.00020.09
8.0.270.0030.00516.75
8.0.260.0030.00318.44
8.0.250.0040.00416.93
8.0.240.0070.00417.05
8.0.230.0000.00716.94
8.0.220.0070.00016.94
8.0.210.0070.00016.96
8.0.200.0000.00616.88
8.0.190.0000.00817.03
8.0.180.0040.00416.98
8.0.170.0090.00016.89
8.0.160.0100.00316.91
8.0.150.0110.00616.88
8.0.140.0180.00016.92
8.0.130.0040.00816.91
8.0.120.0170.00316.93
8.0.110.0160.00316.85
8.0.100.0140.00516.90
8.0.90.0140.00516.86
8.0.80.0180.00316.81
8.0.70.0160.00416.86
8.0.60.0050.01416.80
8.0.50.0220.00016.86
8.0.30.0190.00316.88
8.0.20.0200.00017.01
8.0.10.0180.00416.88
7.4.330.0000.00515.55
7.4.320.0000.00616.63
7.4.300.0000.00716.60
7.4.290.0070.00016.43
7.4.280.0080.01216.54
7.4.270.0210.00016.49
7.4.260.0200.00416.32
7.4.250.0180.00416.55
7.4.240.0170.00616.52
7.4.230.0140.01116.37
7.4.220.0210.00016.59
7.4.210.0230.00016.56
7.4.200.0130.00816.54
7.4.190.0130.01016.38
7.4.180.0200.00016.62
7.4.160.0210.00016.36
7.4.150.0150.00616.46
7.4.140.0210.00016.45
7.4.130.0150.00616.38
7.4.120.0160.00516.39
7.4.110.0160.00416.23
7.4.100.0160.00316.45
7.4.90.0090.00916.42
7.4.80.0080.00816.48
7.4.70.0040.00416.41
7.4.60.0030.00316.41
7.4.50.0000.00816.32
7.4.40.0050.00516.40
7.4.30.0050.00516.43
7.4.20.0060.00316.41
7.4.10.0110.00016.41
7.4.00.0150.00416.41

preferences:
21.15 ms | 401 KiB | 5 Q