3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ ['item' => '39.00', 'time' => '0.00'], ['item' => '49.00'], ['time' => '0.00', 'Value' => 0], ['item' => '49.00', 'time' => '0.00'] ]; $array2 = [ ['item' => '39.00', 'time' => '10.00'], ['item' => '49.00'], ['time' => '0.00', 'Value' => 0], ['item' => '49.00', 'time' => '0.00', 'Value' => 3] ]; $result = []; foreach ($array1 as $i => $row1) { $diff = array_diff_assoc($array2[$i], $row1) + array_diff_assoc($row1, $array2[$i]); if ($diff) { $result[$i] = $diff; } } 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.5.00.0140.00719.93
8.4.150.0020.00014.05
8.4.140.0130.00817.30
8.4.130.0150.00517.53
8.4.120.0100.00822.46
8.4.110.0040.00522.46
8.4.100.0100.01017.68
8.4.90.0120.00720.23
8.4.80.0070.00118.99
8.4.70.0120.00918.82
8.4.60.0150.00518.73
8.4.50.0090.00620.54
8.4.40.0100.01018.82
8.4.30.0100.01020.45
8.4.20.0170.00321.25
8.4.10.0130.00619.35
8.3.280.0100.00918.41
8.3.270.0120.00916.41
8.3.260.0110.00816.78
8.3.250.0130.00618.69
8.3.240.0100.00916.42
8.3.230.0050.00316.75
8.3.220.0100.00918.95
8.3.210.0050.00416.55
8.3.200.0070.00316.17
8.3.190.0130.00417.23
8.3.180.0110.00918.83
8.3.170.0030.00617.04
8.3.160.0110.00718.52
8.3.150.0120.00616.93
8.3.140.0070.00016.48
8.3.130.0370.00416.44
8.3.120.0330.00716.29
8.3.110.0280.01116.27
8.3.100.0390.00616.47
8.3.90.0360.00616.36
8.3.80.0330.01116.57
8.3.70.0410.00316.51
8.3.60.0230.00616.57
8.3.50.0250.00416.63
8.3.40.0130.00417.47
8.3.30.0380.00017.38
8.3.20.0310.00417.59
8.3.10.0300.00717.36
8.3.00.0380.00817.59
8.2.290.0100.00916.51
8.2.280.0120.00720.15
8.2.270.0120.00616.37
8.2.260.0120.00617.21
8.2.250.0320.01016.70
8.2.240.0220.01116.21
8.2.230.0170.00016.41
8.2.220.0220.00016.40
8.2.210.0160.00316.18
8.2.200.0120.00616.45
8.2.190.0180.00016.35
8.2.180.0220.00016.47
8.2.170.0180.00018.02
8.2.160.0140.00517.57
8.2.150.0210.00317.47
8.2.140.0280.00917.54
8.2.130.0340.00617.48
8.2.120.0240.01517.59
8.2.110.0350.00617.40
8.2.100.0320.00717.52
8.2.90.0270.01217.59
8.2.80.0350.00317.78
8.2.70.0280.01017.15
8.2.60.0240.01417.49
8.2.50.0260.01317.57
8.2.40.0330.00317.76
8.2.30.0330.00017.56
8.2.20.0290.00717.64
8.2.10.0210.00917.77
8.2.00.0270.00717.58
8.1.330.0050.00422.04
8.1.320.0070.00316.21
8.1.310.0080.00016.70
8.1.300.0240.00716.18
8.1.290.0320.00316.18
8.1.280.0210.01916.18
8.1.270.0290.01017.19
8.1.260.0280.00517.60
8.1.250.0310.01017.32
8.1.240.0220.00717.19
8.1.230.0270.00617.23
8.1.220.0280.00017.36
8.1.210.0320.00616.94
8.1.200.0250.01317.41
8.1.190.0340.00417.04
8.1.180.0320.00416.93
8.1.170.0300.00917.05
8.1.160.0240.01117.30
8.1.150.0300.00417.07
8.1.140.0240.01116.87
8.1.130.0290.00617.23
8.1.120.0270.00817.41
8.1.110.0250.00717.40
8.1.100.0290.00617.28
8.1.90.0320.00417.22
8.1.80.0260.00917.18
8.1.70.0250.00917.27
8.1.60.0310.00717.22
8.1.50.0330.00416.98
8.1.40.0280.00917.44
8.1.30.0300.00317.08
8.1.20.0280.00617.44
8.1.10.0240.00017.30
8.1.00.0310.00817.20

preferences:
35.31 ms | 403 KiB | 5 Q