3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = '[{ "product_name": "Product1", "qty": "1" }, { "product_name": "Product2", "qty": "2" }, { "product_name": "Product3", "qty": "3" }]'; $array2 = '[{ "product_name": "Product4", "qty": "1" }, { "product_name": "Product3", "qty": "1" }, { "product_name": "Product2", "qty": "1" }]'; $arr1 = json_decode($array1, true); $arr2 = json_decode($array2, true); $result = array_merge($arr1,$arr2); 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.60.0070.01118.28
8.3.50.0140.00018.33
8.3.40.0110.00418.53
8.3.30.0070.00718.41
8.3.20.0050.00319.02
8.3.10.0080.00021.91
8.3.00.0060.00322.35
8.2.180.0110.00716.38
8.2.170.0060.00922.96
8.2.160.0070.00720.48
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0040.00420.89
8.2.120.0080.00026.35
8.2.110.0040.00721.13
8.2.100.0090.00317.66
8.2.90.0030.00718.18
8.2.80.0030.00619.95
8.2.70.0000.00817.80
8.2.60.0000.00817.93
8.2.50.0030.00618.16
8.2.40.0040.00420.97
8.2.30.0040.00419.30
8.2.20.0070.00417.93
8.2.10.0040.00418.04
8.2.00.0040.00419.16
8.1.270.0000.00822.14
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00621.92
8.1.230.0030.00720.86
8.1.220.0040.00417.74
8.1.210.0080.00318.89
8.1.200.0040.00417.13
8.1.190.0060.00317.00
8.1.180.0000.00818.10
8.1.170.0000.00918.46
8.1.160.0000.00718.83
8.1.150.0080.00018.83
8.1.140.0000.00817.59
8.1.130.0030.00319.09
8.1.120.0000.00717.39
8.1.110.0040.00417.43
8.1.100.0000.00817.39
8.1.90.0030.00317.44
8.1.80.0040.00417.32
8.1.70.0070.00317.44
8.1.60.0000.00917.36
8.1.50.0000.00817.53
8.1.40.0040.00417.34
8.1.30.0000.00817.52
8.1.20.0040.00417.56
8.1.10.0000.00717.51
8.1.00.0000.00917.41
8.0.300.0020.00519.85
8.0.290.0000.00716.58
8.0.280.0030.00318.37
8.0.270.0000.00917.18
8.0.260.0060.00017.10
8.0.250.0040.00416.94
8.0.240.0070.00016.77
8.0.230.0070.00016.95
8.0.220.0000.00716.83
8.0.210.0070.00016.82
8.0.200.0060.00016.87
8.0.190.0000.00816.79
8.0.180.0040.00416.75
8.0.170.0030.00616.87
8.0.160.0030.00516.81
8.0.150.0000.00716.73
8.0.140.0070.00016.76
8.0.130.0050.00013.23
8.0.120.0080.00016.70
8.0.110.0050.00216.75
8.0.100.0040.00416.86
8.0.90.0030.00416.67
8.0.80.0090.00616.79
8.0.70.0040.00416.71
8.0.60.0000.00716.70
8.0.50.0000.00816.86
8.0.30.0110.00717.07
8.0.20.0100.01417.40
8.0.10.0000.00716.75
8.0.00.0130.00816.71
7.4.330.0020.00215.55
7.4.320.0030.00316.55
7.4.300.0040.00416.46
7.4.290.0080.00016.43
7.4.280.0040.00416.49
7.4.270.0030.00316.56
7.4.260.0030.00316.52
7.4.250.0040.00416.30
7.4.240.0000.00716.45
7.4.230.0070.00016.42
7.4.220.0000.00816.42
7.4.210.0030.01216.48
7.4.200.0000.00716.44
7.4.160.0080.01016.44
7.4.140.0120.00817.86
7.4.130.0070.01016.39
7.4.120.0120.00616.41
7.4.110.0120.01116.34
7.4.100.0100.00616.47
7.4.90.0080.00816.34
7.4.80.0070.01419.39
7.4.70.0130.00316.39
7.4.60.0060.01016.38
7.4.50.0070.01016.17
7.4.40.0060.01216.38
7.4.00.0100.00714.64
7.3.330.0000.00513.05
7.3.320.0000.00512.93
7.3.310.0040.00416.22
7.3.300.0030.00416.18
7.3.290.0040.00416.05
7.3.280.0110.01016.18
7.3.260.0140.00616.34
7.3.240.0080.01116.24
7.3.230.0070.01716.16
7.3.210.0060.01016.46
7.3.200.0090.00916.28
7.3.190.0060.01616.41
7.3.180.0090.00616.32
7.3.170.0120.00616.27
7.3.160.0120.00316.54
7.3.120.0070.01014.61
7.3.110.0070.01114.62
7.3.100.0040.01414.63
7.3.90.0060.01314.42
7.3.80.0100.00014.53
7.3.70.0060.00614.57
7.3.60.0030.00614.80
7.3.50.0110.00414.80
7.3.40.0090.00614.61
7.3.30.0090.00614.70
7.3.20.0090.00916.43
7.3.10.0060.00816.59
7.3.00.0030.01416.57
7.2.330.0110.00716.61
7.2.320.0100.00716.48
7.2.310.0030.01616.32
7.2.300.0080.01216.45
7.2.290.0070.01016.47
7.2.240.0100.01015.09
7.2.230.0100.00715.09
7.2.220.0100.01014.91
7.2.210.0070.00714.99
7.2.200.0120.00314.95
7.2.190.0070.01014.89
7.2.180.0100.00714.62
7.2.170.0040.00814.77
7.2.160.0040.01115.01
7.2.150.0120.00316.49
7.2.140.0070.01016.87
7.2.130.0040.01416.64
7.2.120.0080.00416.90
7.2.110.0070.00716.82
7.2.100.0090.00616.80
7.2.90.0060.00916.45
7.2.80.0030.00916.96
7.2.70.0070.00716.81
7.2.60.0020.01216.75
7.2.50.0080.00716.76
7.2.40.0750.01417.40
7.2.30.0700.01017.40
7.2.20.0720.01017.39
7.2.10.1060.01017.21
7.2.00.0730.00817.29
7.1.330.0090.00615.50
7.1.320.0090.00915.59
7.1.310.0040.00715.68
7.1.300.0030.01415.39
7.1.290.0100.00315.77
7.1.280.0000.00815.74
7.1.270.0120.00615.68
7.1.260.0070.00315.50
7.1.250.0000.01415.91
7.1.200.0060.00315.80
7.1.160.1300.00616.93
7.1.150.1220.00816.93
7.1.140.1460.00717.04
7.1.130.1370.00816.91
7.1.120.1370.01016.94
7.1.110.1380.01015.93
7.1.100.1470.00616.20
7.1.90.2170.00716.27
7.1.80.2140.00715.93
7.1.70.2130.00615.20
7.1.60.2580.01333.12
7.1.50.3970.01033.04
7.1.40.3780.01532.41
7.1.30.3620.00932.49
7.1.20.4640.01032.61
7.1.10.6480.01014.94
7.1.00.3630.00914.92

preferences:
50.97 ms | 400 KiB | 5 Q