3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = array ( 0 => array ( 'id' => 5, 'name' => 'Education' ), 1 => array ( 'id' => 4, 'name' => 'Computers' ), 3 => array ( 'id' => 7, 'name' => 'Science' ), 4 => array ( 'id' => 1, 'name' => 'Sports' ), ); $second = array ( 0 => array ( 'id' => 1, 'title' => 'Sport' ), 1 => array ( 'id' => 7, 'title' => 'Sci' ), 3 => array ( 'id' => 4, 'title' => 'Comp' ), 4 => array ( 'id' => 5, 'title' => 'Edu' ), ); $second = array_column($second, null, 'id'); foreach ($first as &$subject) { $subject += $second[$subject['id']] ?? []; } print_r($first);

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.0120.00820.59
8.4.110.0070.00220.59
8.4.100.0090.00817.52
8.4.90.0130.00820.46
8.4.80.0050.00418.96
8.4.70.0080.01418.65
8.4.60.0070.00222.44
8.4.50.0130.00918.78
8.4.40.0120.00817.60
8.4.30.0190.00020.36
8.4.20.0070.01419.31
8.4.10.0030.00620.72
8.3.250.0120.00718.86
8.3.240.0120.00616.57
8.3.230.0090.01016.68
8.3.220.0040.00420.60
8.3.210.0040.00416.75
8.3.200.0030.00516.70
8.3.190.0070.00116.94
8.3.180.0130.00618.78
8.3.170.0120.00617.06
8.3.160.0140.00417.19
8.3.150.0090.00916.79
8.3.140.0140.00416.58
8.3.130.0100.00016.80
8.3.120.0040.00420.63
8.3.110.0000.00820.94
8.3.100.0070.01018.22
8.3.90.0040.00426.77
8.3.80.0030.00919.36
8.3.70.0120.00318.56
8.3.60.0070.01416.75
8.3.50.0150.00523.62
8.3.40.0130.00321.90
8.3.30.0070.01418.67
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0130.00617.35
8.2.280.0110.00518.31
8.2.270.0100.00716.50
8.2.260.0000.00816.55
8.2.250.0050.00316.53
8.2.240.0090.00017.29
8.2.230.0050.00322.58
8.2.220.0100.00724.06
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0120.00316.58
8.2.180.0080.00825.92
8.2.170.0070.00722.96
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0140.00026.35
8.2.110.0030.00620.37
8.2.100.0080.00417.91
8.2.90.0050.00317.80
8.2.80.0090.00019.45
8.2.70.0000.00917.93
8.2.60.0040.00418.16
8.2.50.0060.00318.10
8.2.40.0030.00619.42
8.2.30.0040.00419.19
8.2.20.0110.00018.17
8.2.10.0040.00419.36
8.2.00.0040.00419.17
8.1.330.0100.00915.91
8.1.320.0100.00816.31
8.1.310.0120.00616.59
8.1.300.0000.00918.21
8.1.290.0070.00430.84
8.1.280.0150.00325.92
8.1.270.0000.00823.99
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0060.00322.51
8.1.230.0040.00722.18
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0000.00917.22
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0050.00318.65
8.1.160.0070.00019.06
8.1.150.0000.00718.90
8.1.140.0050.00318.88
8.1.130.0050.00320.19
8.1.120.0050.00317.47
8.1.110.0040.00417.46
8.1.100.0030.00517.36
8.1.90.0040.00417.44
8.1.80.0000.00717.29
8.1.70.0050.00317.38
8.1.60.0040.00817.57
8.1.50.0030.00517.40
8.1.40.0000.00817.39
8.1.30.0040.00417.72
8.1.20.0000.00817.54
8.1.10.0030.00517.52
8.1.00.0040.00417.46
8.0.300.0040.00419.86
8.0.290.0080.00016.88
8.0.280.0030.00318.44
8.0.270.0030.00516.75
8.0.260.0030.00320.14
8.0.250.0000.00817.02
8.0.240.0030.00317.04
8.0.230.0000.00616.93
8.0.220.0030.00316.86
8.0.210.0070.00016.93
8.0.200.0030.00317.05
8.0.190.0050.00316.88
8.0.180.0040.00417.00
8.0.170.0090.00017.01
8.0.160.0040.00416.97
8.0.150.0000.00816.80
8.0.140.0070.00016.93
8.0.130.0030.00313.42
8.0.120.0080.00016.88
8.0.110.0040.00416.81
8.0.100.0080.00016.89
8.0.90.0030.00316.82
8.0.80.0080.01016.86
8.0.70.0040.00416.84
8.0.60.0070.00316.87
8.0.50.0070.00016.79
8.0.30.0110.01116.88
8.0.20.0080.01017.13
8.0.10.0080.00017.13
8.0.00.0190.00316.93
7.4.330.0050.00015.55
7.4.320.0000.00616.59
7.4.300.0000.00716.54
7.4.290.0070.00016.45
7.4.280.0030.00616.61
7.4.270.0000.00816.55
7.4.260.0030.00313.26
7.4.250.0000.00716.51
7.4.240.0000.00716.59
7.4.230.0030.00316.48
7.4.220.0000.00716.55
7.4.210.0080.00616.57
7.4.200.0050.00216.55
7.4.130.0080.01416.59
7.4.120.0000.01816.63
7.4.110.0090.00916.46
7.4.100.0140.00616.71
7.4.90.0190.00016.32
7.4.80.0070.01016.32
7.4.70.0100.00716.35
7.4.60.0130.00316.68
7.4.50.0060.00916.34
7.4.40.0030.01416.44
7.4.30.0130.00316.29
7.4.20.0070.01116.37
7.4.10.0030.01316.62
7.4.00.0100.00716.54
7.3.330.0070.00016.18
7.3.320.0030.00313.07
7.3.310.0040.00416.46
7.3.300.0030.00316.38
7.3.290.0070.00916.37
7.3.260.0150.00416.63
7.3.230.0100.00716.38
7.3.220.0110.00716.23
7.3.210.0090.00816.19
7.3.200.0100.00616.46
7.3.190.0100.00616.36
7.3.180.0160.00016.51
7.3.170.0130.00316.43
7.3.160.0160.00616.35
7.3.150.0100.00716.39
7.3.140.0120.00616.47
7.3.130.0090.00916.33
7.3.120.0100.00616.39
7.3.110.0160.00016.55
7.3.100.0080.00816.31
7.3.90.0080.00816.41
7.3.80.0110.00616.49
7.3.70.0130.00316.38
7.3.60.0100.00716.36
7.3.50.0070.01016.27
7.3.40.0160.00016.33
7.3.30.0090.00916.36
7.3.20.0060.01216.40
7.3.10.0090.00916.47
7.3.00.0130.00516.27
7.2.340.0060.01216.71
7.2.330.0070.01016.51
7.2.320.0030.01316.72
7.2.310.0100.00716.47
7.2.300.0130.00316.52
7.2.290.0030.01316.35
7.2.280.0110.00616.44
7.2.270.0140.00416.50
7.2.260.0100.00616.70
7.2.250.0110.00616.60
7.2.240.0090.00916.65
7.2.230.0060.01116.70
7.2.220.0030.01316.66
7.2.210.0070.01016.75
7.2.200.0030.01316.56
7.2.190.0090.00916.52
7.2.180.0110.00716.47
7.2.170.0120.00616.51
7.2.160.0130.00316.59
7.2.150.0190.00016.57
7.2.140.0090.00916.50
7.2.130.0070.01016.45
7.2.120.0420.00716.64
7.2.110.0070.01016.53
7.2.100.0090.00816.60
7.2.90.0140.00316.75
7.2.80.0110.00716.38
7.2.70.0150.00316.46
7.2.60.0060.01216.53
7.2.50.0120.00616.57
7.2.40.0110.00716.72
7.2.30.0140.00316.49
7.2.20.0080.01116.66
7.2.10.0110.00716.53
7.2.00.0040.01516.41

preferences:
28.25 ms | 403 KiB | 5 Q