3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ ['id_cat' => 1, 'title_cat' => 2], ['id_cat' => 3, 'title_cat' => 4] ]; $array2 = [ ['id_prod' => 1, 'title_prod' => 2], ['id_prod' => 3, 'title_prod' => 4] ]; foreach($array1 as $key => $value) { $result[$key] = array_merge($array1[$key], $array2[$key]); } echo json_encode($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.60.0090.00918.56
8.3.50.0100.00318.04
8.3.40.0160.00018.83
8.3.30.0120.00318.63
8.3.20.0040.00420.88
8.3.10.0040.00422.07
8.3.00.0050.00323.67
8.2.180.0160.00618.26
8.2.170.0100.01022.96
8.2.160.0000.01322.20
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0070.00019.77
8.2.110.0030.00721.12
8.2.100.0040.00818.22
8.2.90.0060.00318.03
8.2.80.0000.00818.05
8.2.70.0030.00617.63
8.2.60.0040.00417.63
8.2.50.0000.00717.98
8.2.40.0000.00819.89
8.2.30.0040.00418.01
8.2.20.0000.00818.01
8.2.10.0000.00719.25
8.2.00.0040.00419.32
8.1.280.0120.00625.92
8.1.270.0040.00422.44
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0140.00321.98
8.1.230.0090.00322.60
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0030.00517.62
8.1.160.0040.00418.94
8.1.150.0030.00319.02
8.1.140.0080.00020.69
8.1.130.0070.00020.11
8.1.120.0040.00417.33
8.1.110.0040.00417.43
8.1.100.0040.00417.38
8.1.90.0000.00717.47
8.1.80.0000.00817.43
8.1.70.0030.00317.52
8.1.60.0040.00417.57
8.1.50.0070.00417.57
8.1.40.0030.00517.48
8.1.30.0050.00317.68
8.1.20.0040.00417.56
8.1.10.0090.00317.55
8.1.00.0060.00317.55
8.0.300.0070.00019.82
8.0.290.0080.00016.75
8.0.280.0030.00318.50
8.0.270.0030.00318.04
8.0.260.0030.00320.00
8.0.250.0030.00316.91
8.0.240.0030.00517.01
8.0.230.0000.00716.82
8.0.220.0000.00716.89
8.0.210.0030.00516.90
8.0.200.0060.00016.86
8.0.190.0050.00216.98
8.0.180.0000.00716.82
8.0.170.0080.00016.95
8.0.160.0000.00817.02
8.0.150.0030.00516.73
8.0.140.0000.00716.75
8.0.130.0030.00313.34
8.0.120.0050.00316.88
8.0.110.0040.00416.78
8.0.100.0020.00517.02
8.0.90.0000.00916.95
8.0.80.0050.01416.91
8.0.70.0040.00316.96
8.0.60.0000.00716.80
8.0.50.0000.00816.79
8.0.30.0070.01017.27
8.0.20.0070.01417.29
8.0.10.0000.00716.90
8.0.00.0000.02116.67
7.4.330.0020.00216.79
7.4.320.0030.00316.56
7.4.300.0030.00316.59
7.4.290.0040.00416.62
7.4.280.0060.00316.56
7.4.270.0070.00016.51
7.4.260.0000.00513.29
7.4.250.0030.00316.59
7.4.240.0060.00216.50
7.4.230.0030.00316.36
7.4.220.0030.00316.41
7.4.210.0090.00816.57
7.4.200.0000.00716.36
7.4.130.0120.00616.53
7.4.120.0130.01316.68
7.4.110.0040.01316.45
7.4.100.0060.01216.58
7.4.90.0070.01016.60
7.4.80.0070.01019.39
7.4.70.0060.00916.45
7.4.60.0120.00616.65
7.4.50.0150.00016.66
7.4.40.0070.01116.33
7.4.10.0050.01414.81
7.4.00.0060.00914.65
7.3.330.0030.00316.33
7.3.320.0000.00513.17
7.3.310.0070.00016.40
7.3.300.0030.00316.37
7.3.290.0060.00816.26
7.3.260.0080.01116.25
7.3.240.0060.01216.43
7.3.230.0070.01516.34
7.3.210.0060.01216.59
7.3.200.0180.00316.31
7.3.190.0090.01216.28
7.3.180.0170.00616.56
7.3.170.0030.01716.57
7.3.160.0110.01116.34
7.3.130.0150.00614.73
7.3.120.0170.00414.46
7.3.110.0130.00714.84
7.3.100.0100.01314.75
7.3.90.0040.01714.76
7.3.80.0040.01715.16
7.3.70.0140.00614.83
7.3.60.0110.01114.76
7.3.50.0060.01514.72
7.3.40.0160.00814.89
7.3.30.0170.00714.75
7.3.20.0170.00314.91
7.3.10.0130.01214.70
7.3.00.0230.00314.70
7.2.330.0100.00716.48
7.2.320.0110.01116.57
7.2.310.0100.00616.57
7.2.300.0070.01416.69
7.2.290.0080.00816.71
7.2.260.0180.00315.17
7.2.250.0170.00314.81
7.2.240.0110.00614.96
7.2.230.0140.01115.05
7.2.220.0160.00515.02
7.2.210.0110.01714.98
7.2.200.0170.00714.96
7.2.190.0200.00014.93
7.2.180.0120.01214.92
7.2.170.0130.00814.93
7.2.160.0180.00414.99
7.2.150.0190.00815.14
7.2.140.0150.01115.14
7.2.130.0160.00415.02
7.2.120.0130.00915.02
7.2.110.0130.01014.83
7.2.100.0180.00514.87
7.2.90.0130.01015.21
7.2.80.0150.00815.08
7.2.70.0180.00415.09
7.2.60.0170.00515.11
7.2.50.0110.01114.98
7.2.40.0130.00915.01
7.2.30.0200.00815.12
7.2.20.0230.00615.04
7.2.10.0120.00715.09
7.2.00.0070.00714.91

preferences:
52.72 ms | 401 KiB | 5 Q