3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first_arrays = [ ['itemId' => 2, 'title' => 'someTitle', 'bulk_id' => 4], ['itemId' => 3, 'title' => 'someTitle', 'bulk_id' => 5], ['itemId' => 4, 'title' => 'someTitle', 'bulk_id' => 6], ]; $second_arrays = [ ['info' => 'someInfo', 'bulk_id' => 6], ['info' => 'someInfo', 'bulk_id' => 5], ['info' => 'someInfo', 'bulk_id' => 4], ]; function sort_by_bulk(array $a, array $b) : int { return $a['bulk_id'] <=> $b['bulk_id']; } usort($first_arrays, 'sort_by_bulk'); usort($second_arrays, 'sort_by_bulk'); $combined = array_map('array_merge', $first_arrays, $second_arrays); var_dump($combined);

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.5.30.0150.00919.12
8.5.20.0120.00619.42
8.5.10.0110.00618.56
8.5.00.0110.01020.16
8.4.180.0180.00722.12
8.4.170.0140.00820.49
8.4.160.0110.01123.05
8.4.150.0060.00716.87
8.4.140.0150.01217.56
8.4.130.0130.00617.64
8.4.120.0120.00820.61
8.4.110.0100.01018.86
8.4.100.0120.00918.71
8.4.90.0050.00420.76
8.4.80.0130.00517.75
8.4.70.0060.00218.11
8.4.60.0130.00919.09
8.4.50.0150.00317.71
8.4.40.0100.01017.71
8.4.30.0140.00717.72
8.4.20.0070.01319.35
8.4.10.0060.00319.71
8.3.300.0110.01020.73
8.3.290.0140.00720.81
8.3.280.0110.01018.60
8.3.270.0120.00816.64
8.3.260.0030.00616.60
8.3.250.0040.00618.77
8.3.240.0130.00416.45
8.3.230.0040.00416.41
8.3.220.0110.00818.96
8.3.210.0110.00518.47
8.3.200.0050.00316.63
8.3.190.0110.00420.69
8.3.180.0130.00716.48
8.3.170.0100.01017.27
8.3.160.0090.01016.57
8.3.150.0150.00317.32
8.3.140.0040.00416.61
8.3.130.0070.00418.38
8.3.120.0030.01320.77
8.3.110.0080.00016.47
8.3.100.0080.00016.74
8.3.90.0040.00418.53
8.3.80.0060.00318.26
8.3.70.0040.01116.50
8.3.60.0070.00718.31
8.3.50.0120.00518.37
8.3.40.0080.00818.85
8.3.30.0070.01118.51
8.3.20.0050.00320.16
8.3.10.0080.00021.90
8.3.00.0040.00419.25
8.2.300.0120.00918.00
8.2.290.0110.00820.24
8.2.280.0090.00918.93
8.2.270.0070.01318.81
8.2.260.0000.00820.42
8.2.250.0020.00518.63
8.2.240.0040.00417.02
8.2.230.0030.00620.94
8.2.220.0060.00324.06
8.2.210.0100.01026.77
8.2.200.0030.00618.17
8.2.190.0060.01016.63
8.2.180.0110.00718.54
8.2.170.0070.01122.96
8.2.160.0070.00721.02
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.00621.08
8.2.120.0040.00426.35
8.2.110.0060.00319.31
8.2.100.0090.00317.91
8.2.90.0000.00818.19
8.2.80.0030.00518.09
8.2.70.0040.00417.75
8.2.60.0000.00817.63
8.2.50.0050.00317.63
8.2.40.0030.00617.75
8.2.30.0040.00417.65
8.2.20.0000.00818.01
8.2.10.0000.00718.21
8.2.00.0070.00318.32
8.1.340.0140.00921.66
8.1.330.0090.01022.21
8.1.320.0110.01016.42
8.1.310.0070.00716.63
8.1.300.0090.00620.05
8.1.290.0090.00018.88
8.1.280.0150.00425.92
8.1.270.0080.00020.23
8.1.260.0060.01226.35
8.1.250.0080.00028.09
8.1.240.0030.00622.51
8.1.230.0040.00720.80
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0000.00718.96
8.1.150.0070.00020.33
8.1.140.0050.00317.64
8.1.130.0070.00020.67
8.1.120.0000.00717.53
8.1.110.0000.00817.52
8.1.100.0000.00817.40
8.1.90.0050.00217.51
8.1.80.0040.00417.45
8.1.70.0020.00517.48
8.1.60.0040.00417.49
8.1.50.0060.00317.51
8.1.40.0000.00817.54
8.1.30.0040.00417.61
8.1.20.0040.00417.63
8.1.10.0080.00017.62
8.1.00.0040.00417.52
8.0.300.0000.00819.95
8.0.290.0040.00416.63
8.0.280.0040.00418.08
8.0.270.0000.00918.09
8.0.260.0030.00316.75
8.0.250.0080.00016.96
8.0.240.0000.00816.91
8.0.230.0000.00716.86
8.0.220.0000.00716.90
8.0.210.0070.00016.93
8.0.200.0000.00616.90
8.0.190.0040.00416.93
8.0.180.0050.00316.86
8.0.170.0060.00316.93
8.0.160.0040.00416.80
8.0.150.0030.00516.89
8.0.140.0030.00316.77
8.0.130.0030.00313.38
8.0.120.0030.00616.78
8.0.110.0000.00716.95
8.0.100.0000.00716.73
8.0.90.0040.00416.75
8.0.80.0120.00416.88
8.0.70.0000.00716.96
8.0.60.0000.00716.85
8.0.50.0000.00816.80
8.0.30.0110.00916.99
8.0.20.0100.01017.40
8.0.10.0000.00817.07
8.0.00.0100.00816.74
7.4.330.0000.00415.55
7.4.320.0000.00716.60
7.4.300.0040.00416.63
7.4.290.0040.00416.49
7.4.280.0050.00316.50
7.4.270.0000.00816.54
7.4.260.0000.00716.61
7.4.250.0040.00416.51
7.4.240.0050.00316.64
7.4.230.0070.00016.42
7.4.220.0040.00416.36
7.4.210.0090.00916.45
7.4.200.0030.00516.71
7.4.160.0090.01216.53
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0100.01016.47
7.4.120.0110.00916.49
7.4.110.0100.00716.66
7.4.100.0140.01216.61
7.4.90.0100.00916.52
7.4.80.0090.01319.39
7.4.70.0070.01516.62
7.4.60.0070.01116.52
7.4.50.0090.00616.34
7.4.40.0050.01116.31
7.4.00.0110.00714.94
7.3.330.0050.00013.19
7.3.320.0070.00013.38
7.3.310.0040.00316.43
7.3.300.0000.00716.39
7.3.290.0040.01116.30
7.3.280.0110.00716.32
7.3.270.0120.00617.40
7.3.260.0120.00516.40
7.3.250.0090.01016.42
7.3.240.0100.00816.33
7.3.230.0160.00316.36
7.3.210.0150.00816.29
7.3.200.0030.01416.63
7.3.190.0050.01116.32
7.3.180.0110.01116.35
7.3.170.0090.00916.41
7.3.160.0100.00616.41
7.3.120.0070.01014.93
7.3.110.0070.01014.80
7.3.100.0080.00814.69
7.3.90.0090.00514.73
7.3.80.0100.00514.89
7.3.70.0050.01114.58
7.3.60.0110.00514.70
7.3.50.0030.01214.64
7.3.40.0090.00514.95
7.3.30.0070.00914.88
7.3.20.0090.00516.61
7.3.10.0070.00816.64
7.3.00.0130.00516.68
7.2.330.0160.00316.75
7.2.320.0120.01216.74
7.2.310.0070.01516.17
7.2.300.0100.01016.46
7.2.290.0090.00916.72
7.2.250.0150.00415.27
7.2.240.0030.01515.06
7.2.230.0060.01014.68
7.2.220.0110.00615.07
7.2.210.0070.00814.68
7.2.200.0070.01114.95
7.2.190.0080.00815.09
7.2.180.0050.01214.94
7.2.170.0050.01014.79
7.2.160.0030.01214.74
7.2.150.0040.01116.65
7.2.140.0000.01616.64
7.2.130.0030.00716.70
7.2.120.0070.00716.84
7.2.110.0120.00316.98
7.2.100.0060.00616.88
7.2.90.0070.01117.03
7.2.80.0070.01116.79
7.2.70.0110.00717.06
7.2.60.0060.00716.68
7.2.50.0040.01516.92
7.2.40.0100.01016.77
7.2.30.0060.01016.81
7.2.20.0030.01116.92
7.2.10.0150.00517.46
7.2.00.0160.00317.33
7.1.330.0070.01115.86
7.1.320.0080.00515.83
7.1.310.0080.00315.87
7.1.300.0040.00815.56
7.1.290.0060.00715.82
7.1.280.0030.01215.86
7.1.270.0090.00515.86
7.1.260.0020.00915.59
7.1.250.0100.00315.97
7.1.200.0180.00015.82
7.1.130.0200.00616.70
7.1.120.0150.01516.72
7.1.110.0210.00715.88
7.1.100.0260.00715.92
7.1.90.0200.01016.08
7.1.80.0200.01015.96
7.1.70.0200.01015.34
7.1.60.0320.01633.14
7.1.50.0400.00632.87
7.1.40.0490.00732.45
7.1.30.0420.01332.49
7.1.20.0490.00632.66
7.1.10.0720.01014.61
7.1.00.0640.00714.93

preferences:
99.29 ms | 1729 KiB | 5 Q