3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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_ukey($array1, $array2, "key_compare_func"); print_r($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.3.60.0150.00616.63
8.3.50.0150.00322.04
8.3.40.0100.01018.87
8.3.30.0140.00319.04
8.3.20.0070.00020.21
8.3.10.0060.00320.27
8.3.00.0050.00319.38
8.2.180.0040.01116.63
8.2.170.0090.00622.96
8.2.160.0140.00320.10
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.03
8.2.110.0100.00020.54
8.2.100.0080.00318.03
8.2.90.0000.00819.17
8.2.80.0080.00017.97
8.2.70.0030.00517.50
8.2.60.0040.00417.93
8.2.50.0000.00918.07
8.2.40.0040.00418.28
8.2.30.0060.00319.50
8.2.20.0000.00717.67
8.2.10.0040.00418.05
8.2.00.0000.00717.63
8.1.280.0110.00425.92
8.1.270.0060.00323.96
8.1.260.0030.00626.35
8.1.250.0050.00228.09
8.1.240.0060.00322.20
8.1.230.0080.00318.99
8.1.220.0060.00317.77
8.1.210.0000.00718.77
8.1.200.0030.00917.38
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0000.00722.02
8.1.150.0040.00418.93
8.1.140.0070.00017.39
8.1.130.0000.00717.83
8.1.120.0070.00017.43
8.1.110.0040.00317.46
8.1.100.0040.00417.54
8.1.90.0070.00017.44
8.1.80.0000.00717.33
8.1.70.0000.00717.42
8.1.60.0060.00617.52
8.1.50.0000.00817.55
8.1.40.0000.00817.48
8.1.30.0040.00417.66
8.1.20.0000.00817.67
8.1.10.0070.00017.49
8.1.00.0040.00417.43
8.0.300.0020.00518.77
8.0.290.0000.00816.75
8.0.280.0070.00018.46
8.0.270.0030.00617.25
8.0.260.0060.00017.27
8.0.250.0000.00716.96
8.0.240.0000.00616.95
8.0.230.0040.00416.95
8.0.220.0000.00716.89
8.0.210.0000.00716.81
8.0.200.0000.00716.95
8.0.190.0050.00216.86
8.0.180.0030.00517.00
8.0.170.0000.00816.81
8.0.160.0000.00716.87
8.0.150.0030.00316.91
8.0.140.0050.00616.85
8.0.130.0030.00313.35
8.0.120.0040.00416.75
8.0.110.0000.00716.96
8.0.100.0040.00416.88
8.0.90.0040.00416.79
8.0.80.0030.01216.89
8.0.70.0000.00717.01
8.0.60.0040.00416.82
8.0.50.0000.00716.95
8.0.30.0100.01116.90
8.0.20.0140.00717.40
8.0.10.0040.00416.91
8.0.00.0090.00916.76
7.4.330.0050.00015.12
7.4.320.0030.00316.55
7.4.300.0000.00716.62
7.4.290.0070.00016.42
7.4.280.0080.00216.42
7.4.270.0030.00316.50
7.4.260.0000.00716.59
7.4.250.0000.00716.56
7.4.240.0040.00416.64
7.4.230.0070.00016.62
7.4.220.0130.00716.57
7.4.210.0060.00916.70
7.4.200.0070.00016.63
7.4.150.0110.00617.40
7.4.140.0090.01117.86
7.4.130.0110.00616.33
7.4.120.0050.01116.61
7.4.110.0030.01416.64
7.4.100.0060.01016.27
7.4.90.0080.00816.53
7.4.80.0130.01019.39
7.4.70.0100.00716.24
7.4.60.0070.01416.38
7.4.50.0000.00816.42
7.4.40.0040.01916.25
7.4.30.0120.00316.52
7.4.00.0100.00315.20
7.3.330.0020.00213.13
7.3.320.0030.00313.25
7.3.310.0070.00016.34
7.3.300.0000.00716.17
7.3.290.0060.01316.29
7.3.280.0100.00816.30
7.3.270.0110.00717.40
7.3.260.0110.00616.23
7.3.250.0130.00816.22
7.3.240.0070.01016.29
7.3.230.0070.01016.39
7.3.210.0100.00616.20
7.3.200.0060.01119.39
7.3.190.0100.00616.21
7.3.180.0030.01416.42
7.3.170.0090.00616.48
7.3.160.0100.00716.44
7.3.10.0080.00516.40
7.3.00.0090.00616.55
7.2.330.0090.00916.63
7.2.320.0100.00716.41
7.2.310.0120.00416.61
7.2.300.0070.01016.49
7.2.290.0030.01316.61
7.2.130.0000.01516.91
7.2.120.0060.00916.84
7.2.110.0180.00716.58
7.2.100.0110.00716.73
7.2.90.0030.01316.97
7.2.80.0120.01916.94
7.2.70.0140.00716.59
7.2.60.0140.00916.46
7.2.50.0190.01316.50
7.2.40.0040.01516.43
7.2.30.0170.01016.70
7.2.20.0150.01516.76
7.2.10.0150.00316.78
7.2.00.0100.01516.84
7.1.250.0040.00715.70
7.1.200.0040.00715.55
7.1.70.0110.00417.21
7.1.60.0170.00719.61
7.1.50.0000.01516.84
7.1.00.0100.07022.50
7.0.200.0000.00716.54
7.0.140.0070.07021.99
7.0.60.0030.09319.88
7.0.50.0000.05717.88
7.0.40.0100.03720.23
7.0.30.0700.05720.24
7.0.20.0230.08320.13
7.0.10.0070.04020.12
7.0.00.0030.08720.25
5.6.280.0070.06721.04
5.6.210.0030.04020.48
5.6.200.0030.08318.15
5.6.190.0100.05320.33
5.6.180.0430.06320.61
5.6.170.0300.07020.55
5.6.160.0070.06320.54
5.6.150.0070.07318.29
5.6.140.0070.05718.26
5.6.130.0100.07318.14
5.6.120.0030.08321.14
5.6.110.0170.07320.99
5.6.100.0030.09021.14
5.6.90.0100.07720.97
5.6.80.0130.07720.36
5.6.70.0200.06720.41
5.5.350.0070.06320.53
5.5.340.0030.05718.07
5.5.330.0030.05320.29
5.5.320.0370.06320.30
5.5.310.0270.07720.24
5.5.300.0100.08017.97
5.5.290.0030.08317.97
5.5.280.0070.08020.90
5.5.270.0030.04720.86
5.5.260.0130.06720.96
5.5.250.0070.07320.58
5.5.240.0030.07020.12
5.4.450.0670.05719.61
5.4.440.0470.05719.61
5.4.430.0600.06019.61
5.4.420.0730.06019.46
5.4.410.0830.05319.34
5.4.400.0230.05319.26
5.4.390.0700.06719.28
5.4.380.0300.06718.78
5.4.370.0400.04718.69
5.4.360.0230.06018.48
5.4.350.0230.05318.61
5.4.340.0270.05318.69
5.4.320.0070.04212.50
5.4.310.0090.03612.50
5.4.300.0110.04712.51
5.4.290.0100.03912.50
5.4.280.0050.03712.40
5.4.270.0090.03712.40
5.4.260.0070.04012.40
5.4.250.0080.04512.40
5.4.240.0060.04312.39
5.4.230.0130.04512.39
5.4.220.0070.03712.39
5.4.210.0080.03312.39
5.4.200.0050.03912.39
5.4.190.0060.03612.39
5.4.180.0090.03912.38
5.4.170.0090.03412.39
5.4.160.0060.04212.39
5.4.150.0080.03712.39
5.4.140.0070.03712.07
5.4.130.0090.04012.05
5.4.120.0080.03612.02
5.4.110.0050.04012.01
5.4.100.0050.04012.01
5.4.90.0080.03712.02
5.4.80.0080.03712.01
5.4.70.0060.03412.01
5.4.60.0070.03812.00
5.4.50.0090.03512.00
5.4.40.0070.04011.99
5.4.30.0070.04211.99
5.4.20.0060.03712.00
5.4.10.0070.03512.00
5.4.00.0070.03511.48
5.3.290.0110.04612.80
5.3.280.0100.04312.71
5.3.270.0070.03812.72
5.3.260.0080.03712.72
5.3.250.0090.03812.72
5.3.240.0080.03612.72
5.3.230.0100.03512.71
5.3.220.0060.03712.68
5.3.210.0060.04212.68
5.3.200.0090.04612.68
5.3.190.0070.04912.68
5.3.180.0080.03912.67
5.3.170.0090.03912.67
5.3.160.0050.03712.67
5.3.150.0040.03912.68
5.3.140.0090.03412.66
5.3.130.0030.04212.65
5.3.120.0080.03812.66
5.3.110.0080.04012.66
5.3.100.0120.04112.12
5.3.90.0100.03712.10
5.3.80.0060.03912.09
5.3.70.0070.03712.09
5.3.60.0070.03812.07
5.3.50.0090.03912.02
5.3.40.0060.03612.02
5.3.30.0100.03311.98
5.3.20.0040.03911.77
5.3.10.0070.03511.73
5.3.00.0040.03811.71
5.2.170.0060.0369.21
5.2.160.0050.0299.22
5.2.150.0080.0289.21
5.2.140.0050.0319.21
5.2.130.0090.0349.17
5.2.120.0080.0269.18
5.2.110.0050.0339.18
5.2.100.0070.0329.18
5.2.90.0080.0259.18
5.2.80.0080.0349.18
5.2.70.0050.0299.17
5.2.60.0050.0309.12
5.2.50.0030.0329.09
5.2.40.0080.0279.07
5.2.30.0050.0309.05
5.2.20.0060.0289.04
5.2.10.0030.0318.94
5.2.00.0050.0288.81
5.1.60.0030.0258.08
5.1.50.0050.0248.08
5.1.40.0040.0248.06
5.1.30.0020.0298.41
5.1.20.0070.0308.44
5.1.10.0080.0268.16
5.1.00.0040.0278.16
5.0.50.0070.0236.65
5.0.40.0030.0276.50
5.0.30.0060.0316.31
5.0.20.0040.0196.28
5.0.10.0040.0216.26
5.0.00.0060.0286.25
4.4.90.0030.0154.78
4.4.80.0030.0154.75
4.4.70.0040.0144.76
4.4.60.0040.0154.75
4.4.50.0030.0154.77
4.4.40.0040.0244.71
4.4.30.0030.0224.75
4.4.20.0050.0124.85
4.4.10.0030.0214.85
4.4.00.0030.0284.76
4.3.110.0040.0234.67
4.3.100.0020.0224.67
4.3.90.0030.0154.63
4.3.80.0030.0244.58
4.3.70.0050.0134.63
4.3.60.0060.0114.63
4.3.50.0050.0144.63
4.3.40.0020.0254.54
4.3.30.0040.0203.30
4.3.20.0020.0193.28
4.3.10.0020.0153.24
4.3.00.0170.0177.56

preferences:
28.8 ms | 401 KiB | 5 Q