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 = array_merge($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.0080.00320.47
8.4.110.0130.00722.17
8.4.100.0110.00917.68
8.4.90.0100.01118.75
8.4.80.0120.00817.87
8.4.70.0130.00718.02
8.4.60.0130.00718.84
8.4.50.0050.00317.59
8.4.40.0110.00817.74
8.4.30.0130.00720.57
8.4.20.0200.00019.49
8.4.10.0090.00020.86
8.3.250.0120.00618.67
8.3.240.0120.00616.50
8.3.230.0130.00816.43
8.3.220.0110.00717.38
8.3.210.0060.00718.33
8.3.200.0060.00316.33
8.3.190.0050.00519.17
8.3.180.0110.00816.44
8.3.170.0090.00918.75
8.3.160.0100.00016.58
8.3.150.0150.00420.42
8.3.140.0050.00316.66
8.3.130.0040.00418.41
8.3.120.0060.00318.92
8.3.110.0100.00720.94
8.3.100.0030.00616.25
8.3.90.0080.00018.37
8.3.80.0030.00619.36
8.3.70.0090.00618.56
8.3.60.0150.00616.50
8.3.50.0100.00823.58
8.3.40.0070.01421.98
8.3.30.0120.00318.72
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0120.00720.25
8.2.280.0120.00818.56
8.2.270.0090.00917.20
8.2.260.0090.00918.35
8.2.250.0000.00816.69
8.2.240.0030.00618.91
8.2.230.0090.00022.58
8.2.220.0070.00424.06
8.2.210.0070.00026.77
8.2.200.0060.00318.16
8.2.190.0130.00316.58
8.2.180.0110.00425.92
8.2.170.0100.01018.98
8.2.160.0060.01222.96
8.2.150.0050.00325.66
8.2.140.0070.00024.66
8.2.130.0050.00326.16
8.2.120.0050.00319.31
8.2.110.0090.00022.05
8.2.100.0040.00817.82
8.2.90.0000.00817.75
8.2.80.0030.00618.91
8.2.70.0070.00317.50
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0070.00418.26
8.2.30.0000.00718.13
8.2.20.0000.00718.12
8.2.10.0020.00519.29
8.2.00.0000.00719.23
8.1.330.0040.00522.09
8.1.320.0100.00916.15
8.1.310.0060.00316.79
8.1.300.0130.00317.73
8.1.290.0090.00018.88
8.1.280.0120.00325.92
8.1.270.0090.00623.96
8.1.260.0090.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00020.40
8.1.230.0030.00717.89
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0020.00518.10
8.1.170.0040.00418.59
8.1.160.0040.00418.95
8.1.150.0000.01018.93
8.1.140.0030.00518.91
8.1.130.0030.00320.02
8.1.120.0000.00717.37
8.1.110.0000.00817.45
8.1.100.0070.00017.41
8.1.90.0040.00417.50
8.1.80.0000.00717.48
8.1.70.0050.00517.47
8.1.60.0040.00417.55
8.1.50.0040.00417.52
8.1.40.0040.00417.52
8.1.30.0080.00017.70
8.1.20.0060.00317.61
8.1.10.0040.00417.55
8.1.00.0000.00817.49
8.0.300.0060.00318.77
8.0.290.0070.00016.63
8.0.280.0030.00520.07
8.0.270.0000.00817.95
8.0.260.0070.00020.14
8.0.250.0030.00316.86
8.0.240.0030.00316.92
8.0.230.0000.00716.97
8.0.220.0030.00316.83
8.0.210.0080.00016.88
8.0.200.0040.00416.88
8.0.190.0070.00016.95
8.0.180.0040.00416.83
8.0.170.0060.00316.84
8.0.160.0030.00316.92
8.0.150.0000.00716.91
8.0.140.0000.01116.83
8.0.130.0000.00513.26
8.0.120.0040.00416.88
8.0.110.0060.00316.79
8.0.100.0070.00016.70
8.0.90.0000.00816.80
8.0.80.0110.00816.91
8.0.70.0040.00416.96
8.0.60.0030.00516.96
8.0.50.0050.00316.71
8.0.30.0080.00816.80
8.0.20.0110.00817.14
8.0.10.0040.00416.89
8.0.00.0100.00716.74
7.4.330.0000.00515.55
7.4.320.0000.00616.62
7.4.300.0000.00816.58
7.4.290.0030.00616.63
7.4.280.0030.00816.39
7.4.270.0000.00816.51
7.4.260.0030.00313.28
7.4.250.0030.00316.37
7.4.240.0030.00316.51
7.4.230.0070.00016.52
7.4.220.0040.00316.61
7.4.210.0080.00716.63
7.4.200.0030.00316.61
7.4.130.0050.01216.49
7.4.120.0110.00716.64
7.4.110.0130.00416.52
7.4.100.0120.00616.55
7.4.90.0070.01016.48
7.4.80.0090.00916.70
7.4.70.0090.00916.52
7.4.60.0090.00816.34
7.4.50.0120.00616.50
7.4.40.0130.00616.58
7.4.30.0090.01116.51
7.4.20.0140.00416.59
7.4.10.0120.00916.36
7.4.00.0100.00716.49
7.3.330.0090.00316.22
7.3.320.0000.00513.18
7.3.310.0040.00416.30
7.3.300.0060.00016.25
7.3.290.0060.00916.31
7.3.260.0130.01016.67
7.3.230.0040.01316.31
7.3.220.0030.01316.40
7.3.210.0100.00716.43
7.3.200.0120.00616.25
7.3.190.0080.00816.48
7.3.180.0070.01016.48
7.3.170.0170.00016.59
7.3.160.0100.00716.28
7.3.150.0060.01216.38
7.3.140.0110.00616.38
7.3.130.0000.01716.39
7.3.120.0040.01216.57
7.3.110.0130.00416.54
7.3.100.0100.01016.49
7.3.90.0080.00816.37
7.3.80.0110.00716.48
7.3.70.0090.00916.34
7.3.60.0100.00716.40
7.3.50.0120.00416.39
7.3.40.0110.00616.39
7.3.30.0060.01116.31
7.3.20.0150.00316.34
7.3.10.0070.01016.26
7.3.00.0120.00616.59
7.2.340.0130.01016.63
7.2.330.0070.01016.58
7.2.320.0090.00916.76
7.2.310.0070.01016.50
7.2.300.0170.00016.47
7.2.290.0050.01316.44
7.2.280.0150.00416.56
7.2.270.0060.01116.43
7.2.260.0070.01016.47
7.2.250.0040.01716.84
7.2.240.0110.00616.90
7.2.230.0120.00816.78
7.2.220.0120.00616.32
7.2.210.0090.00916.71
7.2.200.0110.00616.63
7.2.190.0000.01716.63
7.2.180.0110.00716.58
7.2.170.0090.00916.73
7.2.160.0110.00716.70
7.2.150.0090.00916.68
7.2.140.0000.02016.73
7.2.130.0100.01016.73
7.2.120.0130.00616.68
7.2.110.0160.00316.57
7.2.100.0140.00316.69
7.2.90.0140.00516.61
7.2.80.0070.01316.61
7.2.70.0110.00716.75
7.2.60.0040.01416.78
7.2.50.0060.01016.75
7.2.40.0070.01316.66
7.2.30.0070.01116.71
7.2.20.0060.01216.64
7.2.10.0140.00416.55
7.2.00.0110.00616.57

preferences:
123.39 ms | 403 KiB | 5 Q