3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $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.0090.00616.63
8.3.50.0100.01021.91
8.3.40.0130.00318.65
8.3.30.0100.00718.79
8.3.20.0000.00720.21
8.3.10.0000.00820.25
8.3.00.0040.00419.25
8.2.180.0060.00916.74
8.2.170.0070.00722.96
8.2.160.0130.00318.88
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0050.00226.16
8.2.120.0040.00421.01
8.2.110.0000.00820.48
8.2.100.0110.00018.09
8.2.90.0040.00419.08
8.2.80.0080.00017.97
8.2.70.0040.00417.38
8.2.60.0080.00417.80
8.2.50.0000.00818.07
8.2.40.0040.00417.97
8.2.30.0000.00819.29
8.2.20.0000.00717.51
8.2.10.0000.00718.16
8.2.00.0000.00717.67
8.1.280.0030.01225.92
8.1.270.0030.00523.77
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.70
8.1.230.0120.00019.03
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00717.23
8.1.190.0040.00417.09
8.1.180.0000.00818.10
8.1.170.0040.00818.31
8.1.160.0040.00421.89
8.1.150.0000.00818.76
8.1.140.0000.00717.38
8.1.130.0030.00317.69
8.1.120.0000.00717.39
8.1.110.0000.00717.36
8.1.100.0040.00417.27
8.1.90.0000.00717.25
8.1.80.0030.00317.38
8.1.70.0030.00317.30
8.1.60.0070.00417.49
8.1.50.0040.00417.43
8.1.40.0040.00417.50
8.1.30.0080.00017.56
8.1.20.0040.00417.47
8.1.10.0000.00717.46
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.40
8.0.270.0030.00717.23
8.0.260.0030.00317.25
8.0.250.0030.00316.89
8.0.240.0030.00316.90
8.0.230.0000.00716.74
8.0.220.0030.00316.71
8.0.210.0030.00316.75
8.0.200.0000.00616.87
8.0.190.0000.00716.88
8.0.180.0040.00416.88
8.0.170.0040.00416.84
8.0.160.0070.00016.77
8.0.150.0040.00416.77
8.0.140.0040.00416.67
8.0.130.0000.00613.24
8.0.120.0080.00016.79
8.0.110.0030.00316.79
8.0.100.0050.00216.86
8.0.90.0000.00716.82
8.0.80.0090.00616.78
8.0.70.0000.00816.65
8.0.60.0040.00416.78
8.0.50.0040.00416.63
8.0.30.0110.00817.05
8.0.20.0070.01317.40
8.0.10.0000.00816.83
8.0.00.0090.00816.69
7.4.330.0050.00015.01
7.4.320.0000.00716.40
7.4.300.0070.00016.55
7.4.290.0030.00316.48
7.4.280.0050.00616.43
7.4.270.0030.00316.44
7.4.260.0030.00516.55
7.4.250.0000.00716.47
7.4.240.0040.00316.49
7.4.230.0030.00316.33
7.4.220.0070.01616.38
7.4.210.0070.01416.42
7.4.200.0070.00016.54
7.4.160.0000.02116.40
7.4.150.0190.00317.40
7.4.140.0140.00817.86
7.4.130.0130.00516.35
7.4.120.0080.01016.30
7.4.110.0110.00616.39
7.4.100.0070.01016.30
7.4.90.0100.00716.25
7.4.80.0160.00419.39
7.4.70.0060.01716.45
7.4.60.0120.00616.37
7.4.50.0040.00416.46
7.4.40.0090.00816.51
7.4.30.0090.00616.38
7.4.00.0000.01314.54
7.3.330.0060.00013.02
7.3.320.0000.00612.86
7.3.310.0000.00716.26
7.3.300.0030.00316.04
7.3.290.0130.00616.14
7.3.280.0090.00516.12
7.3.270.0120.00617.40
7.3.260.0160.00016.13
7.3.250.0100.01116.07
7.3.240.0070.01316.16
7.3.230.0150.00216.39
7.3.210.0090.01316.59
7.3.200.0110.00519.39
7.3.190.0060.01216.18
7.3.180.0030.01216.35
7.3.170.0070.01416.27
7.3.160.0090.00616.14
7.2.330.0070.01016.51
7.2.320.0170.00416.37
7.2.310.0120.00316.34
7.2.300.0040.01816.53
7.2.290.0100.00716.49
7.2.60.0030.00516.74
7.2.00.0000.01419.34
7.1.200.0030.00615.68
7.1.100.0060.00917.90
7.1.70.0000.00717.10
7.1.60.0140.01019.61
7.1.50.0060.01216.78
7.1.00.0070.07022.40
7.0.200.0040.00416.46
7.0.140.0070.07022.04
7.0.60.0030.04720.02
7.0.50.0030.05717.82
7.0.40.0170.08019.90
7.0.30.0330.07020.34
7.0.20.0270.06320.02
7.0.10.0070.06720.00
7.0.00.0130.07720.09
5.6.280.0100.06321.06
5.6.210.0100.07020.56
5.6.200.0070.08318.22
5.6.190.0070.06720.35
5.6.180.0570.06320.61
5.6.170.0400.05320.46
5.6.160.0100.07320.50
5.6.150.0070.08018.13
5.6.140.0130.05718.12
5.6.130.0070.07718.25
5.6.120.0030.06721.09
5.6.110.0100.07321.13
5.6.100.0000.04721.04
5.6.90.0070.05720.87
5.6.80.0070.05020.50
5.5.350.0230.07020.40
5.5.340.0130.06318.02
5.5.330.0000.04720.40
5.5.320.0100.05720.31
5.5.310.0400.06020.20
5.5.300.0170.07317.95
5.5.290.0030.08317.97
5.5.280.0070.08020.98
5.5.270.0100.05320.74
5.5.260.0070.08720.96
5.5.250.0000.09020.70
5.5.240.0300.06020.15
5.4.450.1030.04719.39
5.4.440.0400.03319.54
5.4.430.0100.06019.54
5.4.420.0230.06719.54
5.4.410.0130.05319.41
5.4.400.0170.05319.21
5.4.390.0070.06018.89
5.4.380.0470.04318.73
5.4.370.0200.05318.73
5.4.360.0200.05318.60
5.4.350.0300.05018.73
5.4.340.0300.04318.62
5.4.320.0060.03912.45
5.4.310.0060.04712.45
5.4.300.0070.05412.45
5.4.290.0100.04312.45
5.4.280.0050.04712.35
5.4.270.0070.04712.35
5.4.260.0080.04112.34
5.4.250.0050.03812.34
5.4.240.0100.03712.35
5.4.230.0060.03812.34
5.4.220.0100.04312.34
5.4.210.0080.03712.34
5.4.200.0080.03612.34
5.4.190.0060.04012.34
5.4.180.0100.05112.34
5.4.170.0100.04112.34
5.4.160.0120.03712.34
5.4.150.0070.03512.34
5.4.140.0090.04212.02
5.4.130.0080.04812.01
5.4.120.0070.04411.96
5.4.110.0100.04311.96
5.4.100.0090.04511.96
5.4.90.0060.05811.96
5.4.80.0090.05211.96
5.4.70.0060.03511.96
5.4.60.0080.04011.96
5.4.50.0060.05311.96
5.4.40.0080.03711.95
5.4.30.0090.05011.95
5.4.20.0060.03511.95
5.4.10.0050.03511.95
5.4.00.0050.04711.44
5.3.290.0060.03912.80
5.3.280.0060.04912.71
5.3.270.0080.04512.72
5.3.260.0020.05112.72
5.3.250.0080.03612.72
5.3.240.0070.04212.72
5.3.230.0100.03812.71
5.3.220.0080.05112.68
5.3.210.0080.04312.68
5.3.200.0060.03812.68
5.3.190.0110.04212.68
5.3.180.0030.04612.68
5.3.170.0080.03812.67
5.3.160.0070.03912.68
5.3.150.0090.03512.67
5.3.140.0090.03412.66
5.3.130.0070.03912.66
5.3.120.0060.03912.66
5.3.110.0050.04112.66
5.3.100.0080.04712.12
5.3.90.0100.03412.09
5.3.80.0080.03412.08
5.3.70.0080.04212.07
5.3.60.0080.03412.07
5.3.50.0070.04112.00
5.3.40.0110.04612.00
5.3.30.0090.03811.94
5.3.20.0130.03511.72
5.3.10.0080.03711.69
5.3.00.0050.04711.68
5.2.170.0070.0359.18
5.2.160.0060.0279.18
5.2.150.0070.0369.18
5.2.140.0050.0409.18
5.2.130.0060.0299.13
5.2.120.0050.0369.14
5.2.110.0040.0309.14
5.2.100.0060.0289.14
5.2.90.0040.0369.14
5.2.80.0040.0439.14
5.2.70.0060.0319.14
5.2.60.0040.0309.09
5.2.50.0020.0349.05
5.2.40.0020.0339.03
5.2.30.0060.0339.01
5.2.20.0070.0369.00
5.2.10.0040.0328.92
5.2.00.0050.0368.77
5.1.60.0080.0238.06
5.1.50.0020.0268.06
5.1.40.0080.0338.04
5.1.30.0040.0428.39
5.1.20.0080.0378.41
5.1.10.0060.0398.14
5.1.00.0070.0298.14
5.0.50.0050.0236.61
5.0.40.0020.0276.47
5.0.30.0040.0316.29
5.0.20.0030.0196.26
5.0.10.0030.0206.23
5.0.00.0030.0316.23
4.4.90.0010.0174.78
4.4.80.0040.0144.76
4.4.70.0040.0164.75
4.4.60.0040.0144.76
4.4.50.0050.0254.77
4.4.40.0030.0324.71
4.4.30.0020.0194.76
4.4.20.0030.0204.84
4.4.10.0040.0314.85
4.4.00.0040.0264.75
4.3.110.0030.0254.67
4.3.100.0040.0194.66
4.3.90.0060.0154.63
4.3.80.0020.0304.58
4.3.70.0050.0234.63
4.3.60.0060.0234.63
4.3.50.0040.0214.63
4.3.40.0050.0394.54
4.3.30.0030.0363.28
4.3.20.0030.0343.25
4.3.10.0040.0173.22
4.3.00.0030.01313.57

preferences:
40.69 ms | 401 KiB | 5 Q