3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue"); $array2 = array("a" => "green", "c" => "blue2", "d" => "cyan"); $result = array_diff_key($array1, $array2); 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.40.0120.00318.76
8.3.30.0120.00318.77
8.3.20.0040.00420.21
8.3.10.0030.00523.63
8.3.00.0080.00020.62
8.2.170.0040.01122.96
8.2.160.0130.00020.23
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0100.00326.16
8.2.120.0040.00419.01
8.2.110.0060.00321.98
8.2.100.0060.00617.72
8.2.90.0090.00019.05
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0080.00019.82
8.2.30.0050.00218.16
8.2.20.0040.00417.61
8.2.10.0060.00318.09
8.2.00.0040.00417.55
8.1.270.0040.00423.81
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00323.61
8.1.230.0070.00419.20
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0050.00317.12
8.1.180.0030.00518.10
8.1.170.0050.00318.39
8.1.160.0040.00421.94
8.1.150.0040.00418.63
8.1.140.0070.00017.29
8.1.130.0000.00717.71
8.1.120.0040.00417.39
8.1.110.0000.00817.39
8.1.100.0070.00017.34
8.1.90.0050.00217.45
8.1.80.0040.00417.38
8.1.70.0030.00317.39
8.1.60.0040.00417.50
8.1.50.0030.00517.35
8.1.40.0000.00917.45
8.1.30.0000.00817.57
8.1.20.0080.00017.64
8.1.10.0030.00617.38
8.1.00.0070.00017.37
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00818.37
8.0.270.0000.00917.19
8.0.260.0000.00617.09
8.0.250.0000.00716.88
8.0.240.0070.00016.92
8.0.230.0070.00016.88
8.0.220.0000.00716.84
8.0.210.0030.00316.88
8.0.200.0000.00616.77
8.0.190.0030.00616.84
8.0.180.0000.00716.82
8.0.170.0040.00416.87
8.0.160.0030.00516.93
8.0.150.0000.00716.80
8.0.140.0000.00816.77
8.0.130.0060.00013.16
8.0.120.0000.00816.78
8.0.110.0040.00416.83
8.0.100.0050.00316.90
8.0.90.0040.00416.93
8.0.80.0030.01916.80
8.0.70.0050.00216.64
8.0.60.0000.00716.62
8.0.50.0030.00516.77
8.0.30.0070.01316.91
8.0.20.0120.00817.40
8.0.10.0040.00416.79
8.0.00.0100.00716.70
7.4.330.0020.00215.00
7.4.320.0030.00316.48
7.4.300.0060.00016.44
7.4.290.0030.00316.47
7.4.280.0080.00016.51
7.4.270.0000.00716.46
7.4.260.0030.00316.40
7.4.250.0000.00816.46
7.4.240.0030.00316.41
7.4.230.0070.00016.28
7.4.220.0090.00916.63
7.4.210.0060.01316.64
7.4.200.0070.00016.32
7.4.160.0100.00616.31
7.4.150.0130.00317.40
7.4.140.0110.01117.86
7.4.130.0120.00516.56
7.4.120.0110.00616.51
7.4.110.0160.00616.48
7.4.100.0150.00716.52
7.4.90.0100.01016.38
7.4.80.0130.01019.39
7.4.70.0030.01316.50
7.4.60.0000.01616.27
7.4.50.0030.00316.59
7.4.40.0100.00616.50
7.4.30.0130.00316.35
7.4.00.0090.00614.93
7.3.330.0030.00512.98
7.3.320.0030.00313.04
7.3.310.0050.00316.22
7.3.300.0070.00016.17
7.3.290.0070.00716.19
7.3.280.0120.01016.09
7.3.270.0090.00917.40
7.3.260.0140.01016.36
7.3.250.0100.00716.36
7.3.240.0130.00316.27
7.3.230.0000.01616.46
7.3.210.0030.01316.50
7.3.200.0180.00319.39
7.3.190.0070.01416.53
7.3.180.0060.00916.14
7.3.170.0120.00316.27
7.3.160.0090.00616.22
7.3.120.0100.00714.47
7.2.330.0080.01516.36
7.2.320.0060.01016.31
7.2.310.0090.00616.31
7.2.300.0160.00016.61
7.2.290.0080.00816.57
7.2.00.0080.00519.35
7.1.100.0040.00818.17
7.1.70.0000.00816.52
7.1.60.0030.02119.70
7.1.50.0140.01016.65
7.1.00.0000.09322.45
7.0.200.0000.00816.75
7.0.140.0070.06722.07
7.0.100.0030.05019.82
7.0.90.0130.07719.93
7.0.80.0030.05019.84
7.0.70.0270.04319.91
7.0.60.0070.05019.90
7.0.50.0100.03720.30
7.0.40.0070.04019.95
7.0.30.0070.05019.99
7.0.20.0170.05320.02
7.0.10.0100.03319.98
7.0.00.0030.06320.04
5.6.280.0070.07020.89
5.6.250.0100.06720.51
5.6.240.0070.04020.52
5.6.230.0030.06320.57
5.6.220.0170.06020.42
5.6.210.0100.04720.56
5.6.200.0100.05720.88
5.6.190.0070.05021.07
5.6.180.0100.03720.88
5.6.170.0100.08720.96
5.6.160.0100.06021.11
5.6.150.0130.06320.96
5.6.140.0070.03721.04
5.6.130.0130.04320.98
5.6.120.0100.08320.99
5.6.110.0070.07320.88
5.6.100.0030.07020.96
5.6.90.0100.03720.88
5.6.80.0030.06720.38
5.6.70.0000.04020.34
5.6.60.0070.08020.34
5.6.50.0030.08320.34
5.6.40.0030.03720.38
5.6.30.0000.04720.47
5.6.20.0030.05720.37
5.6.10.0000.07720.23
5.6.00.0070.06720.21
5.5.380.0130.06320.30
5.5.370.0030.05020.29
5.5.360.0000.05320.35
5.5.350.0000.05020.36
5.5.340.0070.06320.75
5.5.330.0100.07020.82
5.5.320.0070.07020.82
5.5.310.0030.04320.83
5.5.300.0130.03320.75
5.5.290.0030.04720.74
5.5.280.0030.08320.71
5.5.270.0070.04020.54
5.5.260.0000.07720.73
5.5.250.0130.07020.63
5.5.240.0130.03720.21
5.5.230.0130.07020.11
5.5.220.0070.03720.20
5.5.210.0100.07320.20
5.5.200.0000.04320.07
5.5.190.0070.07720.18
5.5.180.0100.04720.02
5.5.160.0030.04020.15
5.5.150.0000.07320.04
5.5.140.0030.03720.17
5.5.130.0070.07720.07
5.5.120.0100.07720.19
5.5.110.0070.06320.07
5.5.100.0070.04319.99
5.5.90.0030.03720.11
5.5.80.0070.05020.09
5.5.70.0070.03720.00
5.5.60.0070.04320.00
5.5.50.0030.05320.09
5.5.40.0030.04320.07
5.5.30.0030.04319.86
5.5.20.0070.07319.98
5.5.10.0130.08320.00
5.5.00.0100.07719.89
5.4.450.0070.03719.11
5.4.440.0030.05719.26
5.4.430.0030.04019.27
5.4.420.0030.06719.14
5.4.410.0070.07319.34
5.4.400.0000.03719.15
5.4.390.0100.07318.83
5.4.380.0100.04018.92
5.4.370.0030.06019.00
5.4.360.0070.05719.03
5.4.350.0070.07318.98
5.4.340.0100.04719.10
5.4.320.0000.06719.13
5.4.310.0000.04019.06
5.4.300.0030.04319.15
5.4.290.0100.07719.02
5.4.280.0100.07018.90
5.4.270.0030.07019.03
5.4.260.0030.07318.78
5.4.250.0070.06018.89
5.4.240.0070.03319.02
5.4.230.0130.06719.11
5.4.220.0030.06319.02
5.4.210.0070.04719.14
5.4.200.0000.04019.12
5.4.190.0000.05718.89
5.4.180.0030.08319.09
5.4.170.0130.06319.06
5.4.160.0130.07319.04
5.4.150.0030.08318.92
5.4.140.0100.06016.29
5.4.130.0030.04716.32
5.4.120.0000.04016.27
5.4.110.0030.07716.43
5.4.100.0170.06316.27
5.4.90.0000.05016.32
5.4.80.0100.05716.36
5.4.70.0030.05716.39
5.4.60.0100.05316.42
5.4.50.0100.06016.20
5.4.40.0030.05016.46
5.4.30.0030.06016.30
5.4.20.0100.05716.18
5.4.10.0030.07016.34
5.4.00.0030.04715.72
5.3.290.0030.08314.62
5.3.280.0000.04014.58
5.3.270.0170.07014.61
5.3.260.0070.06714.47
5.3.250.0030.07714.59
5.3.240.0000.07314.60
5.3.230.0100.03714.55
5.3.220.0130.05314.55
5.3.210.0070.03314.43
5.3.200.0030.05314.55
5.3.190.0030.08314.47
5.3.180.0100.08014.58
5.3.170.0030.03714.57
5.3.160.0030.08014.43
5.3.150.0000.04714.51
5.3.140.0000.07714.39
5.3.130.0100.06314.50
5.3.120.0100.07014.46
5.3.110.0070.03714.36
5.3.100.0030.05013.89
5.3.90.0070.07313.92
5.3.80.0100.06313.92
5.3.70.0000.03714.02
5.3.60.0070.03313.96
5.3.50.0000.04313.90
5.3.40.0100.07313.80
5.3.30.0030.03013.68
5.3.20.0100.04313.60
5.3.10.0030.04013.61
5.3.00.0000.04713.61
5.2.170.0030.03310.99
5.2.160.0000.06710.98
5.2.150.0030.02711.21
5.2.140.0000.03011.14
5.2.130.0030.02710.89
5.2.120.0070.02711.08
5.2.110.0100.04711.08
5.2.100.0030.05311.15
5.2.90.0070.06010.95
5.2.80.0000.04711.08
5.2.70.0030.03711.16
5.2.60.0030.04311.00
5.2.50.0030.04710.98
5.2.40.0070.03010.81
5.2.30.0100.03711.04
5.2.20.0070.02310.94
5.2.10.0100.03710.80
5.2.00.0000.02710.66
5.1.60.0030.0539.83
5.1.50.0000.02310.00
5.1.40.0070.0309.96
5.1.30.0000.03310.40
5.1.20.0000.02710.25
5.1.10.0100.04310.13
5.1.00.0070.02010.06
5.0.50.0100.0408.59
5.0.40.0000.0208.43
5.0.30.0000.0478.27
5.0.20.0030.0238.27
5.0.10.0030.0438.15
5.0.00.0030.0408.25
4.4.90.0000.0376.56
4.4.80.0030.0276.56
4.4.70.0030.0206.56
4.4.60.0000.0336.56
4.4.50.0000.0376.56
4.4.40.0070.0436.56
4.4.30.0070.0306.56
4.4.20.0100.0136.56
4.4.10.0030.0306.56
4.4.00.0030.0206.56
4.3.110.0030.0336.56
4.3.100.0030.0276.56
4.3.90.0070.0306.56
4.3.80.0000.0436.56
4.3.70.0000.0306.56
4.3.60.0000.0376.56
4.3.50.0000.0236.56
4.3.40.0000.0306.56
4.3.30.0030.0276.56
4.3.20.0000.0176.56
4.3.10.0000.0176.56
4.3.00.0000.0236.56

preferences:
40.09 ms | 400 KiB | 5 Q