3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a' => '123', 'b' => '321', 'c' => ['asdf' => 'asdf']]; $b = ['a' => '123', 'b' => '123', 'c' => ['asdf' => 'asdf123']]; $r = array_udiff_assoc($a, $b, function($old, $new) { if ($old === $new) { return 0; } return (count($old) > $new ? 1 : -1); }); var_dump($r);

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.0110.00416.88
8.3.50.0120.00318.17
8.3.40.0120.00318.79
8.3.30.0140.00018.67
8.3.20.0040.00420.29
8.3.10.0060.00323.65
8.3.00.0040.00417.63
8.2.180.0070.01518.54
8.2.170.0110.00322.96
8.2.160.0110.00320.40
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0090.00026.16
8.2.120.0070.00417.63
8.2.110.0030.00721.00
8.2.100.0080.00317.80
8.2.90.0000.00819.08
8.2.80.0060.00317.97
8.2.70.0060.00317.61
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0090.00019.32
8.2.30.0000.00720.73
8.2.20.0040.00417.62
8.2.10.0000.00818.15
8.2.00.0040.00418.13
8.1.280.0110.00425.92
8.1.270.0050.00324.02
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0080.00019.00
8.1.230.0080.00417.66
8.1.220.0000.00817.91
8.1.210.0080.00318.77
8.1.200.0030.00617.35
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0040.00422.14
8.1.150.0000.00718.77
8.1.140.0050.00319.58
8.1.130.0030.00317.81
8.1.120.0070.00017.52
8.1.110.0040.00417.45
8.1.100.0000.00817.47
8.1.90.0040.00417.41
8.1.80.0000.00817.48
8.1.70.0080.00017.46
8.1.60.0080.00017.58
8.1.50.0030.00617.61
8.1.40.0040.00417.54
8.1.30.0040.00417.52
8.1.20.0000.00717.58
8.1.10.0000.00717.55
8.1.00.0080.00417.52
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0040.00418.42
8.0.270.0000.00717.21
8.0.260.0070.00017.22
8.0.250.0000.00717.01
8.0.240.0000.00816.98
8.0.230.0070.00016.95
8.0.220.0000.00716.91
8.0.210.0030.00316.88
8.0.200.0060.00016.91
8.0.190.0040.00417.07
8.0.180.0000.00717.00
8.0.170.0000.00816.87
8.0.160.0040.00316.89
8.0.150.0050.00316.95
8.0.140.0000.00716.87
8.0.130.0000.00613.39
8.0.120.0030.00516.88
8.0.110.0000.00817.00
8.0.100.0040.00416.87
8.0.90.0040.00416.96
8.0.80.0090.00617.01
8.0.70.0080.00016.82
8.0.60.0070.00016.79
8.0.50.0030.00516.98
8.0.30.0110.00717.21
8.0.20.0110.00817.40
8.0.10.0050.00317.02
8.0.00.0090.00816.98
7.4.330.0000.00615.08
7.4.320.0000.00616.52
7.4.300.0070.00016.55
7.4.290.0000.00816.62
7.4.280.0060.00316.65
7.4.270.0000.00716.46
7.4.260.0080.00016.51
7.4.250.0000.00816.45
7.4.240.0020.00516.57
7.4.230.0050.00316.43
7.4.220.0140.00416.45
7.4.210.0070.01016.63
7.4.200.0030.00316.63
7.4.160.0090.00916.56
7.4.150.0070.01017.40
7.4.140.0110.01117.86
7.4.130.0150.00616.49
7.4.120.0060.01116.52
7.4.110.0120.01816.35
7.4.100.0090.00916.61
7.4.90.0120.00616.56
7.4.80.0120.00619.39
7.4.70.0100.00716.54
7.4.60.0100.00616.53
7.4.50.0040.00416.45
7.4.40.0130.00416.15
7.4.30.0110.00616.55
7.4.00.0090.00614.79
7.3.330.0050.00013.45
7.3.320.0000.00513.26
7.3.310.0000.00716.45
7.3.300.0040.00416.37
7.3.290.0090.00616.43
7.3.280.0140.00616.39
7.3.270.0030.01417.40
7.3.260.0060.01116.46
7.3.250.0110.00916.44
7.3.240.0070.01416.59
7.3.230.0080.01116.39
7.3.210.0000.01616.32
7.3.200.0080.00816.66
7.3.190.0090.00616.38
7.3.180.0140.00716.49
7.3.170.0030.01316.70
7.3.160.0100.00616.36
7.2.330.0070.01016.71
7.2.320.0120.00616.71
7.2.310.0030.01916.42
7.2.300.0090.00916.63
7.2.290.0080.00816.63
7.2.60.0050.00816.98
7.2.00.0210.00419.14
7.1.200.0080.00015.46
7.1.100.0100.00718.00
7.1.70.0030.00617.22
7.1.60.0120.01219.43
7.1.50.0180.00316.98
7.1.00.0030.07322.54
7.0.200.0320.00614.95
7.0.60.0070.05019.93
7.0.50.0030.05017.85
7.0.40.0030.04319.96
7.0.30.0470.06020.24
7.0.20.0200.04020.25
7.0.10.0070.04020.13
7.0.00.0070.07320.23
5.6.280.0030.06321.00
5.6.210.0070.05020.61
5.6.200.0070.07318.29
5.6.190.0070.04320.33
5.6.180.0200.04020.43
5.6.170.0200.04320.55
5.6.160.0030.05320.55
5.6.150.0070.08018.27
5.6.140.0070.06718.19
5.6.130.0030.04018.18
5.6.120.0100.08021.04
5.6.110.0070.08020.88
5.6.100.0070.08720.99
5.6.90.0200.07320.97
5.6.80.0070.08020.38
5.5.350.0270.08020.43
5.5.340.0230.06718.02
5.5.330.0100.06720.47
5.5.320.0170.04320.23
5.5.310.0270.06720.37
5.5.300.0130.07318.09
5.5.290.0170.05718.04
5.5.280.0070.05720.87
5.5.270.0100.08020.89
5.5.260.0200.06720.97
5.5.250.0030.04020.55
5.5.240.0100.05320.28
5.4.450.0100.06019.68
5.4.440.0300.07019.45
5.4.430.0130.05719.59
5.4.420.0200.05319.66
5.4.410.0200.07019.02
5.4.400.0170.04718.80
5.4.390.0200.04719.10
5.4.380.0070.05719.25
5.4.370.0170.05319.25
5.4.360.0270.04319.13
5.4.350.0230.04318.86
5.4.340.0170.05019.22
5.4.320.0130.05319.36
5.4.310.0070.05719.05
5.4.300.0100.06019.13
5.4.290.0130.05319.12
5.4.280.0270.04319.12
5.4.270.0130.05019.12
5.4.260.0130.05719.25
5.4.250.0330.04718.84
5.4.240.0200.05319.12
5.4.230.0100.05319.24
5.4.220.0230.06019.01
5.4.210.0130.05719.09
5.4.200.0070.06318.84
5.4.190.0270.04018.97
5.4.180.0100.05718.81
5.4.170.0200.04719.24
5.4.160.0130.05319.20
5.4.150.0200.04718.96
5.4.140.0070.06316.71
5.4.130.0170.04316.51
5.4.120.0170.05316.30
5.4.110.0170.05016.63
5.4.100.0200.04716.45
5.4.90.0170.04716.63
5.4.80.0230.06016.50
5.4.70.0200.04716.58
5.4.60.0270.03716.39
5.4.50.0200.04716.38
5.4.40.0170.04716.57
5.4.30.0170.04316.47
5.4.20.0170.05016.60
5.4.10.0100.05316.30
5.4.00.0100.05015.74

preferences:
56.14 ms | 400 KiB | 5 Q