3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ ['ID' => 1], ['ID' => 2], ['ID' => 3], ['ID' => 4], ['ID' => 5], ]; $array2 = [ ['ID' => 2, 'NUM' => 200], ['ID' => 4, 'NUM' => 400], ]; foreach ($array1 as ['ID' => $id, 'NUM' => &$ref[$id]]) { $ref[$id] = 0; } foreach ($array2 as ['ID' => $id, 'NUM' => $ref[$id]]); var_export($array1);

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.4.120.0100.01020.57
8.4.110.0100.01022.31
8.4.100.0150.00617.65
8.4.90.0130.00718.01
8.4.80.0110.00918.79
8.4.70.0090.01118.04
8.4.60.0080.01318.90
8.4.50.0080.01118.63
8.4.40.0130.00617.59
8.4.30.0100.01020.51
8.4.20.0140.00719.50
8.4.10.0000.00919.39
8.3.250.0110.00818.76
8.3.240.0100.00916.44
8.3.230.0120.00816.86
8.3.220.0100.00819.06
8.3.210.0070.00116.66
8.3.200.0100.00916.78
8.3.190.0130.00717.40
8.3.180.0100.00817.00
8.3.170.0070.01118.96
8.3.160.0140.00317.05
8.3.150.0070.01119.01
8.3.140.0040.00419.14
8.3.130.0090.00918.61
8.3.120.0130.00719.11
8.3.110.0060.00920.94
8.3.100.0030.00724.06
8.3.90.0030.00726.77
8.3.80.0040.00418.43
8.3.70.0090.01218.31
8.3.60.0130.00318.43
8.3.50.0090.00616.84
8.3.40.0110.00623.79
8.3.30.0130.00622.96
8.3.20.0180.00022.96
8.3.10.0140.00722.96
8.3.00.0040.01122.96
8.2.290.0050.00420.41
8.2.280.0090.00718.64
8.2.270.0120.00618.75
8.2.260.0030.00716.49
8.2.250.0030.00616.50
8.2.240.0120.00618.88
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0080.00316.50
8.2.190.0080.00816.58
8.2.180.0040.01116.50
8.2.170.0140.00722.96
8.2.160.0150.00022.96
8.2.150.0070.00722.96
8.2.140.0070.00722.96
8.2.130.0140.00022.96
8.2.120.0160.00022.96
8.2.110.0090.00622.96
8.2.100.0040.01122.96
8.2.90.0080.00822.96
8.2.80.0140.00022.96
8.2.70.0030.01222.96
8.2.60.0070.00722.96
8.2.50.0120.00322.96
8.2.40.0110.00422.96
8.2.30.0130.00322.96
8.2.20.0100.00622.96
8.2.10.0080.00822.96
8.2.00.0120.00322.96
8.1.330.0040.00520.41
8.1.320.0080.01216.24
8.1.310.0120.00418.17
8.1.300.0160.00319.94
8.1.290.0040.00430.84
8.1.280.0140.00725.92
8.1.270.0070.00722.96
8.1.260.0070.00722.96
8.1.250.0120.00322.96
8.1.240.0150.00022.96
8.1.230.0140.00722.96
8.1.220.0130.00722.96
8.1.210.0090.01222.96
8.1.200.0110.00822.96
8.1.190.0120.00322.96
8.1.180.0000.01522.96
8.1.170.0150.00022.96
8.1.160.0060.00922.96
8.1.150.0040.01122.96
8.1.140.0070.00722.96
8.1.130.0120.00322.96
8.1.120.0000.01622.96
8.1.110.0130.00322.96
8.1.100.0100.01322.96
8.1.90.0070.01122.96
8.1.80.0150.00022.96
8.1.70.0030.01222.96
8.1.60.0060.01222.96
8.1.50.0130.00322.96
8.1.40.0170.00322.96
8.1.30.0120.00422.96
8.1.20.0070.01022.96
8.1.10.0090.00622.96
8.1.00.0120.00622.96

preferences:
54.77 ms | 403 KiB | 5 Q