3v4l.org

run code in 300+ PHP versions simultaneously
function key_compare_func($a, $b) { if ($a === $b) { return 0; } return ($a > $b)? 1:-1; } $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $result = array_diff_uassoc($array1, $array2, "key_compare_func"); print_r($result);<?php

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.0100.01718.41
8.3.50.0120.00322.95
8.3.40.0070.00718.56
8.3.30.0120.00319.01
8.3.20.0040.00420.34
8.3.10.0040.00423.65
8.3.00.0000.00819.13
8.2.180.0100.01016.32
8.2.170.0100.01022.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0100.00326.16
8.2.120.0070.00020.96
8.2.110.0090.00020.45
8.2.100.0120.00019.42
8.2.90.0000.00918.09
8.2.80.0060.00317.97
8.2.70.0060.00317.38
8.2.60.0050.00317.91
8.2.50.0090.00018.07
8.2.40.0000.00819.94
8.2.30.0040.00417.93
8.2.20.0000.00817.55
8.2.10.0070.00017.79
8.2.00.0040.00417.42
8.1.280.0140.00725.92
8.1.270.0090.00023.73
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0080.00022.25
8.1.230.0070.00420.90
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0090.00317.22
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0000.00818.49
8.1.160.0050.00221.94
8.1.150.0040.00418.67
8.1.140.0000.00717.35
8.1.130.0040.00417.80
8.1.120.0040.00417.37
8.1.110.0070.00017.21
8.1.100.0040.00417.28
8.1.90.0040.00417.37
8.1.80.0040.00417.33
8.1.70.0000.00717.25
8.1.60.0050.00317.43
8.1.50.0060.00317.37
8.1.40.0000.00817.39
8.1.30.0050.00317.47
8.1.20.0000.00717.36
8.1.10.0040.00417.46
8.1.00.0000.00817.41
8.0.300.0000.00720.03
8.0.290.0070.00016.75
8.0.280.0030.00318.32
8.0.270.0030.00317.24
8.0.260.0060.00017.19
8.0.250.0000.00716.71
8.0.240.0030.00316.75
8.0.230.0030.00516.69
8.0.220.0070.00016.83
8.0.210.0030.00316.75
8.0.200.0000.00616.81
8.0.190.0000.00916.75
8.0.180.0030.00516.70
8.0.170.0040.00416.80
8.0.160.0040.00416.69
8.0.150.0000.00816.61
8.0.140.0040.00416.58
8.0.130.0000.00513.15
8.0.120.0080.00016.58
8.0.110.0070.00016.60
8.0.100.0000.00716.59
8.0.90.0030.00316.82
8.0.80.0060.01316.73
8.0.70.0050.00316.61
8.0.60.0050.00216.60
8.0.50.0040.00416.75
8.0.30.0140.00516.87
8.0.20.0150.00917.40
8.0.10.0040.00416.85
8.0.00.0070.01116.63
7.4.330.0030.00315.00
7.4.320.0030.00316.35
7.4.300.0050.00216.29
7.4.290.0030.00316.28
7.4.280.0050.00316.51
7.4.270.0000.00616.48
7.4.260.0020.00516.37
7.4.250.0000.00916.29
7.4.240.0020.00616.41
7.4.230.0070.00016.40
7.4.220.0030.01616.41
7.4.210.0060.00916.42
7.4.200.0030.00316.54
7.4.160.0040.01116.29
7.4.150.0070.01117.40
7.4.140.0100.00717.86
7.4.130.0150.00416.40
7.4.120.0160.00516.46
7.4.110.0110.00716.33
7.4.100.0030.01316.49
7.4.90.0120.00616.41
7.4.80.0070.01319.39
7.4.70.0090.01416.27
7.4.60.0030.01316.42
7.4.50.0050.00316.41
7.4.40.0060.01616.14
7.4.30.0000.01616.43
7.3.330.0000.00712.97
7.3.320.0000.00613.07
7.3.310.0040.00416.12
7.3.300.0000.00715.97
7.3.290.0130.00616.14
7.3.280.0050.01016.16
7.3.270.0030.01817.40
7.3.260.0070.01716.27
7.3.250.0070.01016.26
7.3.240.0110.00516.17
7.3.230.0070.01616.39
7.3.210.0090.01216.13
7.3.200.0030.01619.39
7.3.190.0060.01616.38
7.3.180.0060.00916.24
7.3.170.0090.00616.27
7.3.160.0090.00616.30
7.2.330.0140.00316.66
7.2.320.0030.01716.51
7.2.310.0130.00716.47
7.2.300.0100.00616.52
7.2.290.0040.01216.30
5.6.10.0030.08320.35
5.6.00.0070.03720.11
5.5.160.0030.07017.45
5.5.150.0030.03717.51
5.5.140.0030.06017.36
5.5.130.0070.06717.36
5.5.120.0030.04317.51
5.5.110.0070.05717.36
5.5.100.0000.06317.28
5.5.90.0000.07317.12
5.5.80.0070.06317.04
5.5.70.0000.04017.06
5.5.60.0000.04317.49
5.5.50.0000.04017.51
5.5.40.0000.05717.11
5.5.30.0000.04317.25
5.5.20.0000.08017.25
5.5.10.0030.07017.26
5.5.00.0000.03317.39
5.4.320.0000.07719.07
5.4.310.0030.07319.06
5.4.300.0100.05718.95
5.4.290.0030.05719.20
5.4.280.0070.07318.93
5.4.270.0030.06718.88
5.4.260.0030.05019.22
5.4.250.0000.07318.97
5.4.240.0000.06019.19
5.4.230.0030.06319.06
5.4.220.0030.07319.04
5.4.210.0070.06318.95
5.4.200.0000.04019.05
5.4.190.0070.07319.02
5.4.180.0000.03719.12
5.4.170.0030.08019.02
5.4.160.0030.06719.02
5.4.150.0000.03318.93
5.4.140.0030.06316.45
5.4.130.0000.06316.20
5.4.120.0000.07016.41
5.4.110.0000.06316.20
5.4.100.0030.04716.43
5.4.90.0030.07316.35
5.4.80.0100.03016.30
5.4.70.0030.04016.35
5.4.60.0100.06316.29
5.4.50.0030.05316.20
5.4.40.0070.06016.25
5.4.30.0030.06716.20
5.4.20.0070.06716.29
5.4.10.0000.06716.40
5.4.00.0030.06315.86
5.3.290.0030.04314.67
5.3.280.0000.04714.66
5.3.270.0030.05714.60
5.3.260.0000.04314.48
5.3.250.0000.07314.70
5.3.240.0030.03014.39
5.3.230.0000.05714.44
5.3.220.0100.03014.62
5.3.210.0100.05014.46
5.3.200.0030.05714.39
5.3.190.0130.04314.55
5.3.180.0000.07714.40
5.3.170.0130.03014.62
5.3.160.0070.07314.50
5.3.150.0030.07014.63
5.3.140.0000.05714.42
5.3.130.0000.03314.60
5.3.120.0000.06714.42
5.3.110.0000.08014.63
5.3.100.0030.05713.86
5.3.90.0070.07313.80
5.3.80.0030.05314.07
5.3.70.0070.07014.11
5.3.60.0000.06013.90
5.3.50.0030.07013.80
5.3.40.0030.06713.72
5.3.30.0030.04313.96
5.3.20.0030.07713.61
5.3.10.0000.06013.71
5.3.00.0030.03713.42
5.2.170.0000.06311.15
5.2.160.0030.06711.08
5.2.150.0000.02711.09
5.2.140.0030.05311.02
5.2.130.0000.03311.02
5.2.120.0030.06011.09
5.2.110.0030.06011.02
5.2.100.0070.05710.90
5.2.90.0070.02311.05
5.2.80.0030.05711.03
5.2.70.0030.06011.01
5.2.60.0000.03010.98
5.2.50.0000.06711.03
5.2.40.0030.05710.98
5.2.30.0000.06311.13
5.2.20.0000.03311.11
5.2.10.0030.05710.98
5.2.00.0030.05710.60
5.1.60.0000.0479.94
5.1.50.0000.0279.94
5.1.40.0000.0309.94
5.1.30.0030.06010.41
5.1.20.0030.05010.34
5.1.10.0070.0379.99
5.1.00.0000.0309.94
5.0.50.0070.0409.94
5.0.40.0070.0409.94
5.0.30.0000.0439.94
5.0.20.0000.0409.94
5.0.10.0000.0379.94
5.0.00.0030.0379.94
4.4.90.0000.0379.94
4.4.80.0000.0379.94
4.4.70.0030.0239.94
4.4.60.0000.0209.94
4.4.50.0000.0209.94
4.4.40.0000.0579.94
4.4.30.0000.0339.94
4.4.20.0000.0239.94
4.4.10.0070.0309.94
4.4.00.0000.0539.94
4.3.110.0030.0309.94
4.3.100.0070.0209.94
4.3.90.0100.0139.94
4.3.80.0030.0339.94
4.3.70.0030.0279.94
4.3.60.0030.0139.94
4.3.50.0030.0339.94
4.3.40.0000.0609.94
4.3.30.0070.0379.94
4.3.20.0000.0339.94
4.3.10.0100.0239.94
4.3.00.0000.0179.94

preferences:
38.61 ms | 401 KiB | 5 Q