3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('a'=>'scope1', 'b'=> 'scope2'); $array2 = array('b'=>'scope2', 'a'=> 'scope1'); var_dump(array_diff($array1, $array2));

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.0080.00818.30
8.3.50.0040.01116.25
8.3.40.0070.01318.42
8.3.30.0100.00718.79
8.3.20.0000.01420.27
8.3.10.0000.00823.48
8.3.00.0040.00419.01
8.2.180.0100.01016.32
8.2.170.0070.01022.96
8.2.160.0090.00420.52
8.2.150.0040.00424.18
8.2.140.0000.01424.66
8.2.130.0000.00826.16
8.2.120.0080.00022.10
8.2.110.0160.00622.31
8.2.100.0110.00017.66
8.2.90.0040.00417.50
8.2.80.0040.00417.97
8.2.70.0030.00618.04
8.2.60.0080.00018.04
8.2.50.0030.00518.10
8.2.40.0030.00520.43
8.2.30.0040.00417.87
8.2.20.0000.00817.53
8.2.10.0040.00417.85
8.2.00.0040.00417.51
8.1.280.0120.00625.92
8.1.270.0080.00023.91
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.13
8.1.230.0070.00419.07
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.10
8.1.190.0030.00517.23
8.1.180.0030.00618.10
8.1.170.0060.00318.45
8.1.160.0050.00221.88
8.1.150.0040.00418.75
8.1.140.0060.00317.25
8.1.130.0070.00017.75
8.1.120.0000.00717.36
8.1.110.0000.00817.45
8.1.100.0030.00517.38
8.1.90.0040.00417.23
8.1.80.0040.00417.24
8.1.70.0030.00317.34
8.1.60.0050.00317.48
8.1.50.0080.00017.37
8.1.40.0030.00617.45
8.1.30.0030.00717.54
8.1.20.0000.00717.60
8.1.10.0000.00717.48
8.1.00.0030.00717.41
8.0.300.0040.00419.70
8.0.290.0080.00016.63
8.0.280.0070.00018.38
8.0.270.0030.00317.18
8.0.260.0030.00317.09
8.0.250.0000.00816.86
8.0.240.0070.00016.88
8.0.230.0000.00716.75
8.0.220.0030.00316.78
8.0.210.0000.00716.77
8.0.200.0030.00316.90
8.0.190.0000.00716.85
8.0.180.0050.00316.84
8.0.170.0000.00816.76
8.0.160.0050.00216.82
8.0.150.0000.00716.68
8.0.140.0040.00416.79
8.0.130.0000.00613.26
8.0.120.0070.00016.79
8.0.110.0070.00016.86
8.0.100.0020.00516.79
8.0.90.0000.00716.75
8.0.80.0090.00616.88
8.0.70.0040.00416.93
8.0.60.0040.00416.70
8.0.50.0030.00316.85
8.0.30.0120.00916.97
8.0.20.0110.00917.40
8.0.10.0000.00716.96
8.0.00.0070.01016.86
7.4.330.0030.00315.03
7.4.320.0000.00616.52
7.4.300.0060.00016.34
7.4.290.0030.00316.49
7.4.280.0050.00316.54
7.4.270.0030.00316.40
7.4.260.0080.00016.45
7.4.250.0050.00316.51
7.4.240.0030.00316.45
7.4.230.0040.00416.30
7.4.220.0100.01616.41
7.4.210.0110.00416.46
7.4.200.0000.00716.41
7.4.160.0060.01016.37
7.4.150.0090.00917.40
7.4.140.0050.01317.86
7.4.130.0110.00616.32
7.4.120.0100.00716.25
7.4.110.0070.01016.37
7.4.100.0070.01416.47
7.4.90.0090.01216.27
7.4.80.0200.00019.39
7.4.70.0070.01016.34
7.4.60.0100.00716.39
7.4.50.0000.00816.20
7.4.40.0060.01816.27
7.4.30.0060.00916.46
7.4.00.0120.00314.71
7.3.330.0000.00513.11
7.3.320.0050.00013.12
7.3.310.0050.00216.17
7.3.300.0030.00316.16
7.3.290.0090.00916.09
7.3.280.0090.00616.16
7.3.270.0120.01117.40
7.3.260.0090.01516.17
7.3.250.0110.00616.19
7.3.240.0070.01416.29
7.3.230.0050.01116.47
7.3.210.0060.01616.40
7.3.200.0110.00919.39
7.3.190.0140.00416.04
7.3.180.0040.01116.38
7.3.170.0180.00416.27
7.3.160.0060.01216.30
7.2.330.0070.01116.66
7.2.320.0030.01416.15
7.2.310.0070.01016.56
7.2.300.0190.00316.38
7.2.290.0100.00616.37
7.2.00.0070.00719.21
7.1.200.0060.00615.68
7.1.100.0000.01118.15
7.1.70.0030.00316.98
7.1.60.0090.01519.11
7.1.50.0230.00616.86
7.1.00.0130.06722.54
7.0.200.0000.00916.57
7.0.140.0070.06722.08
7.0.60.0070.08020.00
7.0.50.0070.04017.88
7.0.40.0170.08020.19
7.0.30.0470.06320.23
7.0.20.0270.07720.00
7.0.10.0100.09719.98
7.0.00.0100.08320.02
5.6.280.0030.09720.88
5.6.210.0100.08320.62
5.6.200.0030.08718.17
5.6.190.0130.07320.41
5.6.180.0230.08020.48
5.6.170.0400.07320.54
5.6.160.0130.06720.50
5.6.150.0000.05318.12
5.6.140.0100.06018.22
5.6.130.0000.09318.12
5.6.120.0070.06720.98
5.6.110.0070.08721.13
5.6.100.0030.04021.00
5.6.90.0070.07320.96
5.6.80.0100.05720.27
5.6.70.4370.04320.49
5.5.350.0100.08720.40
5.5.340.0030.04017.91
5.5.330.0030.06720.56
5.5.320.0330.08020.34
5.5.310.0330.07320.30
5.5.300.0100.08017.94
5.5.290.0030.07318.00
5.5.280.0030.04020.89
5.5.270.0100.06720.75
5.5.260.0070.07720.83
5.5.250.0070.04320.69
5.5.240.0330.06720.18
5.4.450.0900.03719.24
5.4.440.0070.06319.24
5.4.430.0030.05019.57
5.4.420.1430.04319.57
5.4.410.1630.04019.28
5.4.400.1800.05319.09
5.4.390.1570.04318.93
5.4.380.1770.03719.08
5.4.370.1600.03719.09
5.4.360.1470.04319.09
5.4.350.1630.03319.06
5.4.340.1600.03719.14
5.4.320.1900.04719.24
5.4.310.1630.03319.13
5.4.300.0870.03719.24
5.4.290.0130.04319.25
5.4.280.0070.03319.13
5.4.270.0030.03718.93
5.4.260.1770.04318.91
5.4.250.1600.03718.92
5.4.240.1530.04019.08
5.4.230.1630.03319.25
5.4.220.1570.04019.07
5.4.210.1600.04019.24
5.4.200.1570.04018.80
5.4.190.1570.03319.20
5.4.180.2000.04018.88
5.4.170.1800.03019.23
5.4.160.1330.04019.04
5.4.150.0030.03719.22
5.4.140.0070.03316.37
5.4.130.0800.03716.36
5.4.120.1570.03716.32
5.4.110.1800.03716.42
5.4.100.1570.03316.39
5.4.90.1600.03016.30
5.4.80.1570.03016.05
5.4.70.1430.03716.37
5.4.60.1430.03316.16
5.4.50.1400.04016.46
5.4.40.1730.04016.36
5.4.30.1530.03016.31
5.4.20.1600.03316.20
5.4.10.0530.03716.23
5.4.00.0000.04015.63
5.3.290.0130.04014.57
5.3.280.1630.03314.46
5.3.270.1600.03714.55
5.3.260.1770.04314.46
5.3.250.1870.03714.55
5.3.240.1500.04014.47
5.3.230.1530.04014.44
5.3.220.1630.03014.44
5.3.210.1630.03714.41
5.3.200.0470.03014.52
5.3.190.0170.03014.51
5.3.180.0370.04014.57
5.3.170.1630.03714.50
5.3.160.1330.04014.57
5.3.150.1600.04014.39
5.3.140.1670.04314.39
5.3.130.1930.04714.55
5.3.120.1770.04014.42
5.3.110.0870.05314.39
5.3.100.0030.07713.91
5.3.90.0070.04313.86
5.3.80.0100.06314.06
5.3.70.1630.03713.86
5.3.60.1500.04014.05
5.3.50.1600.03713.89
5.3.40.1400.04013.88
5.3.30.1870.04713.75
5.3.20.1730.04013.63
5.3.10.1730.03313.50
5.3.00.1970.04713.68
5.2.170.1500.03710.98
5.2.160.1500.02311.16
5.2.150.1400.02011.20
5.2.140.1430.03010.98
5.2.130.1530.03711.04
5.2.120.1270.03011.04
5.2.110.1430.03310.96
5.2.100.1470.02710.96
5.2.90.1500.03711.04
5.2.80.1330.02711.11
5.2.70.1600.03711.14
5.2.60.1600.03010.88
5.2.50.1230.03310.86
5.2.40.0030.05710.84
5.2.30.0100.04010.83
5.2.20.0000.03010.89
5.2.10.0070.03010.97
5.2.00.0470.04310.68
5.1.60.1330.0239.89
5.1.50.1230.0339.87
5.1.40.1070.0239.90
5.1.30.0730.03710.23
5.1.20.1300.03010.26
5.1.10.1100.03010.05
5.1.00.1100.0239.96
5.0.50.0600.0238.56
5.0.40.0530.0208.56
5.0.30.0570.0278.38
5.0.20.0730.0208.18
5.0.10.0530.0208.14
5.0.00.0570.0278.08
4.4.90.0570.0177.42
4.4.80.0630.0237.42
4.4.70.0530.0137.42
4.4.60.0600.0207.42
4.4.50.0600.0177.42
4.4.40.0000.0507.42
4.4.30.0030.0337.42
4.4.20.0000.0237.42
4.4.10.0030.0137.42
4.4.00.0000.0237.42
4.3.110.0000.0137.42
4.3.100.0000.0177.42
4.3.90.0100.0177.42
4.3.80.0570.0237.42
4.3.70.0600.0207.42
4.3.60.0530.0137.42
4.3.50.0630.0207.42
4.3.40.0530.0237.42
4.3.30.0330.0177.42
4.3.20.0270.0207.42
4.3.10.0370.0307.42
4.3.00.0370.0207.42

preferences:
47.37 ms | 400 KiB | 5 Q