3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "green", "b" => "1", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red", 1.0); $result = array_diff($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.60.0120.00316.50
8.3.50.0100.01018.20
8.3.40.0120.00618.54
8.3.30.0110.00719.14
8.3.20.0040.00420.16
8.3.10.0040.00420.41
8.3.00.0080.00019.13
8.2.180.0180.00416.32
8.2.170.0000.01422.96
8.2.160.0100.00720.29
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0060.00326.16
8.2.120.0040.00421.01
8.2.110.0090.00022.16
8.2.100.0070.00417.78
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0040.00417.92
8.2.50.0060.00318.07
8.2.40.0000.00718.03
8.2.30.0020.00519.38
8.2.20.0070.00017.53
8.2.10.0040.00418.05
8.2.00.0040.00417.66
8.1.280.0070.00725.92
8.1.270.0060.00323.92
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.91
8.1.230.0110.00019.16
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00817.10
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0070.00218.41
8.1.160.0000.00721.93
8.1.150.0000.00718.89
8.1.140.0000.00717.32
8.1.130.0030.00317.81
8.1.120.0000.00717.38
8.1.110.0040.00417.38
8.1.100.0030.00317.37
8.1.90.0070.00017.29
8.1.80.0040.00417.36
8.1.70.0040.00417.27
8.1.60.0060.00617.49
8.1.50.0040.00417.37
8.1.40.0000.00717.43
8.1.30.0050.00317.60
8.1.20.0020.00517.62
8.1.10.0040.00417.48
8.1.00.0050.00217.40
8.0.300.0040.00418.77
8.0.290.0040.00416.73
8.0.280.0030.00318.32
8.0.270.0030.00517.17
8.0.260.0030.00317.24
8.0.250.0070.00016.91
8.0.240.0050.00216.91
8.0.230.0040.00416.94
8.0.220.0030.00316.82
8.0.210.0030.00316.70
8.0.200.0060.00016.91
8.0.190.0000.00716.83
8.0.180.0000.00716.72
8.0.170.0000.00716.84
8.0.160.0000.00716.76
8.0.150.0050.00216.61
8.0.140.0040.00416.80
8.0.130.0000.00513.21
8.0.120.0040.00416.77
8.0.110.0070.00016.84
8.0.100.0070.00016.80
8.0.90.0000.00716.70
8.0.80.0080.01216.77
8.0.70.0080.00016.84
8.0.60.0000.00716.62
8.0.50.0000.00716.91
8.0.30.0090.01017.01
8.0.20.0120.00917.40
8.0.10.0040.00416.93
8.0.00.0080.01116.62
7.4.330.0050.00015.00
7.4.320.0030.00316.52
7.4.300.0000.00716.40
7.4.290.0030.00316.38
7.4.280.0060.00616.54
7.4.270.0000.00716.51
7.4.260.0080.00016.37
7.4.250.0000.00716.31
7.4.240.0030.00316.49
7.4.230.0000.00716.56
7.4.220.0000.01716.46
7.4.210.0060.00916.32
7.4.200.0030.00316.61
7.4.160.0190.00316.31
7.4.150.0150.00417.40
7.4.140.0130.01017.86
7.4.130.0130.00516.26
7.4.120.0030.01316.47
7.4.110.0070.01016.46
7.4.100.0070.01016.55
7.4.90.0090.00816.36
7.4.80.0110.01019.39
7.4.70.0100.00616.45
7.4.60.0140.00716.21
7.4.50.0080.00016.37
7.4.40.0090.00916.29
7.4.30.0050.01016.46
7.4.00.0030.01315.08
7.3.330.0000.00513.02
7.3.320.0050.00012.97
7.3.310.0000.00716.09
7.3.300.0040.00416.15
7.3.290.0120.00616.10
7.3.280.0080.00816.11
7.3.270.0110.01417.40
7.3.260.0030.01316.03
7.3.250.0080.00916.13
7.3.240.0060.01016.22
7.3.230.0120.00416.40
7.3.210.0150.00316.41
7.3.200.0080.00819.39
7.3.190.0100.00916.44
7.3.180.0060.01016.20
7.3.170.0100.00616.43
7.3.160.0090.00616.11
7.3.120.0120.00614.87
7.3.110.0030.01414.42
7.3.100.0000.01314.68
7.3.90.0070.01114.82
7.3.80.0040.01414.73
7.3.70.0060.00614.52
7.3.60.0000.00914.64
7.3.50.0030.00714.43
7.3.40.0030.00914.72
7.3.30.0100.00714.38
7.3.20.0040.00716.19
7.3.10.0020.01116.46
7.3.00.0050.00716.40
7.2.330.0130.00316.30
7.2.320.0070.01016.23
7.2.310.0120.00416.26
7.2.300.0090.00916.53
7.2.290.0100.00616.55
7.2.250.0030.01614.48
7.2.240.0070.01314.99
7.2.230.0070.01115.00
7.2.220.0130.00614.93
7.2.210.0090.00914.90
7.2.200.0100.00614.80
7.2.190.0030.01014.75
7.2.180.0070.00414.54
7.2.170.0030.01014.80
7.2.130.0000.01316.77
7.2.120.0000.01016.69
7.2.110.0030.00716.80
7.2.100.0060.00316.97
7.2.90.0060.00616.74
7.2.80.0000.01216.72
7.2.70.0060.00616.78
7.2.60.0030.00616.58
7.2.50.0030.00616.80
7.2.40.0030.00616.69
7.2.30.0070.00716.61
7.2.20.0030.01016.96
7.2.10.0040.00716.99
7.2.00.0030.00916.78
7.1.330.0070.01015.84
7.1.320.0000.00915.62
7.1.310.0030.00915.61
7.1.300.0040.00815.49
7.1.290.0100.00615.79
7.1.280.0030.00915.79
7.1.270.0040.01115.73
7.1.260.0000.01115.46
7.1.250.0030.00615.48
7.1.100.0060.00617.79
7.1.70.0030.01517.12
7.1.60.0100.01419.61
7.1.50.0080.01216.91
7.1.00.0030.07722.31
7.0.200.0050.00216.63
7.0.140.0070.07322.10
7.0.60.0100.07321.67
7.0.50.0070.05717.68
7.0.40.0070.06019.98
7.0.30.0270.05320.34
7.0.20.0070.05020.00
7.0.10.0130.08720.35
7.0.00.0030.07020.12
5.6.280.0000.07020.88
5.6.210.0100.03720.46
5.6.200.0000.06718.12
5.6.190.0030.04320.68
5.6.180.0500.07020.49
5.6.170.0300.05020.42
5.6.160.0130.07720.44
5.6.150.0000.05018.17
5.6.140.0070.07018.17
5.6.130.0000.09018.11
5.6.120.0030.07021.09
5.6.110.0070.07320.95
5.6.100.0070.03720.98
5.6.90.0070.07721.12
5.6.80.0070.07720.39
5.5.350.0370.06320.34
5.5.340.0070.05017.92
5.5.330.0000.04320.36
5.5.320.0030.04320.21
5.5.310.0170.04720.51
5.5.300.0030.04017.98
5.5.290.0200.06718.01
5.5.280.0100.08720.68
5.5.270.0100.05320.77
5.5.260.0070.07720.74
5.5.250.0000.06020.70
5.5.240.0170.03720.25
5.4.450.0300.04719.19
5.4.440.0400.06019.13
5.4.430.0370.04719.32
5.4.420.0330.06019.39
5.4.410.0270.07019.28
5.4.400.0530.05019.00
5.4.390.0270.07018.96
5.4.380.0200.05319.02
5.4.370.0230.03319.00
5.4.360.0200.04018.81
5.4.350.0230.03319.07
5.4.340.0230.04019.04
5.4.320.0170.04319.03
5.4.310.0200.03719.12
5.4.300.0230.03719.02
5.4.290.0200.04719.06
5.4.280.0270.03319.02
5.4.270.0330.03719.10
5.4.260.0170.03719.08
5.4.250.0130.04018.98
5.4.240.0270.03018.78
5.4.230.0130.04319.10
5.4.220.0370.03719.08
5.4.210.0270.03719.01
5.4.200.0300.04319.05
5.4.190.0230.03718.98
5.4.180.0270.04019.07
5.4.170.0230.05319.06
5.4.160.0270.06718.97
5.4.150.0330.04019.06
5.4.140.0330.04016.55
5.4.130.0300.06016.44
5.4.120.0370.05016.29
5.4.110.0370.06316.30
5.4.100.0400.06016.43
5.4.90.0470.06016.34
5.4.80.0230.04016.44
5.4.70.0230.04016.37
5.4.60.0470.05716.37
5.4.50.0300.07016.18
5.4.40.0370.04016.29
5.4.30.0370.06716.16
5.4.20.0330.05316.45
5.4.10.0400.06016.48
5.4.00.0300.04315.71
5.3.290.0200.04014.50
5.3.280.0070.04314.42
5.3.270.0200.03714.54
5.3.260.0330.07014.46
5.3.250.0330.06314.45
5.3.240.0400.05314.46
5.3.230.0230.04314.47
5.3.220.0300.05714.40
5.3.210.0330.03714.61
5.3.200.0370.04314.52
5.3.190.0330.03714.42
5.3.180.0370.04714.59
5.3.170.0230.04014.61
5.3.160.0270.04314.40
5.3.150.0230.03714.40
5.3.140.0400.06714.50
5.3.130.0330.07714.45
5.3.120.0370.05714.41
5.3.110.0330.05014.38
5.3.100.0300.07314.02
5.3.90.0270.03713.95
5.3.80.0370.06013.86
5.3.70.0230.06014.06
5.3.60.0330.05713.84
5.3.50.0300.06713.80
5.3.40.0330.06013.99
5.3.30.0330.06713.86
5.3.20.0330.04313.55
5.3.10.0300.06713.53
5.3.00.0330.04313.56
5.2.170.0270.04711.30
5.2.160.0270.06011.04
5.2.150.0330.05011.05
5.2.140.0270.06011.07
5.2.130.0200.03310.95
5.2.120.0200.05311.12
5.2.110.0270.04311.12
5.2.100.0230.03710.96
5.2.90.0230.03710.93
5.2.80.0170.03311.14
5.2.70.0200.06011.10
5.2.60.0300.05310.89
5.2.50.0270.04311.02
5.2.40.0200.04711.00
5.2.30.0230.04711.00
5.2.20.0270.05010.79
5.2.10.0300.04710.88
5.2.00.0230.03310.79
5.1.60.0200.0309.92
5.1.50.0230.02010.07
5.1.40.0270.05010.20
5.1.30.0370.04010.23
5.1.20.0270.03710.30
5.1.10.0170.04710.30
5.1.00.0200.0509.95
5.0.50.0130.0438.66
5.0.40.0230.0208.41
5.0.30.0130.0608.34
5.0.20.0130.0408.12
5.0.10.0130.0338.21
5.0.00.0130.0478.20
4.4.90.0130.0307.84
4.4.80.0200.0277.84
4.4.70.0100.0237.84
4.4.60.0200.0307.84
4.4.50.0200.0237.84
4.4.40.0130.0237.84
4.4.30.0170.0107.84
4.4.20.0100.0277.84
4.4.10.0200.0307.84
4.4.00.0170.0477.84
4.3.110.0100.0237.84
4.3.100.0130.0337.84
4.3.90.0170.0307.84
4.3.80.0130.0377.84
4.3.70.0170.0207.84
4.3.60.0130.0277.84
4.3.50.0130.0177.84
4.3.40.0170.0507.84
4.3.30.0030.0277.84
4.3.20.0100.0307.84
4.3.10.0070.0377.84
4.3.00.0100.0337.84

preferences:
44.84 ms | 400 KiB | 5 Q