3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compare($a, $b) { // echo("$a : $b\n"); return ($a == $b ? 0 : 1); // return strcmp($a, $b); } $a = array('11', '21', '31', '41', '11'); $b = array('12', '22', '32', '42', '52', '11'); var_dump(array_udiff($a, $b, 'compare')); echo "\n\n"; $a_new = array_combine($a, array_fill(0, count($a), 1)); $b_new = array_combine($b, array_fill(0, count($b), 1)); var_dump(array_diff_uassoc($a_new, $b_new, 'compare')); echo "\n\n";

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.70.0040.01118.43
8.3.60.0110.00418.56
8.3.50.0120.01222.05
8.3.40.0070.00718.85
8.3.30.0110.00419.04
8.3.20.0070.00020.21
8.3.10.0040.00421.60
8.3.00.0050.00319.04
8.2.190.0140.00716.63
8.2.180.0060.00918.55
8.2.170.0040.01322.96
8.2.160.0100.00320.15
8.2.150.0000.00924.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0040.00419.67
8.2.110.0100.00019.27
8.2.100.0120.00017.72
8.2.90.0040.00417.97
8.2.80.0000.01018.03
8.2.70.0000.00917.63
8.2.60.0090.00018.16
8.2.50.0030.00518.10
8.2.40.0000.00819.34
8.2.30.0040.00419.15
8.2.20.0050.00317.78
8.2.10.0020.00518.21
8.2.00.0040.00417.65
8.1.280.0070.00725.92
8.1.270.0120.00623.90
8.1.260.0040.01126.35
8.1.250.0080.00028.09
8.1.240.0030.00622.35
8.1.230.0030.00922.75
8.1.220.0080.00017.77
8.1.210.0000.00818.79
8.1.200.0050.00317.47
8.1.190.0030.00517.23
8.1.180.0080.00018.10
8.1.170.0000.00818.68
8.1.160.0080.00018.86
8.1.150.0070.00018.89
8.1.140.0000.00717.43
8.1.130.0000.00717.74
8.1.120.0070.00017.39
8.1.110.0040.00417.47
8.1.100.0070.00017.40
8.1.90.0040.00417.45
8.1.80.0000.00717.41
8.1.70.0070.00017.38
8.1.60.0060.00317.64
8.1.50.0090.00017.46
8.1.40.0030.00617.55
8.1.30.0050.00317.68
8.1.20.0040.00417.58
8.1.10.0050.00217.51
8.1.00.0080.00017.36
8.0.300.0040.00419.86
8.0.290.0080.00016.75
8.0.280.0000.00718.41
8.0.270.0000.00817.33
8.0.260.0060.00017.25
8.0.250.0030.00316.89
8.0.240.0050.00316.86
8.0.230.0030.00316.83
8.0.220.0030.00316.87
8.0.210.0030.00316.83
8.0.200.0060.00016.88
8.0.190.0000.00716.91
8.0.180.0000.00716.84
8.0.170.0070.00016.85
8.0.160.0030.00416.82
8.0.150.0040.00416.89
8.0.140.0000.00716.84
8.0.130.0030.00313.30
8.0.120.0030.00616.81
8.0.110.0000.00816.96
8.0.100.0070.00016.73
8.0.90.0040.00416.90
8.0.80.0110.00716.83
8.0.70.0040.00416.92
8.0.60.0000.00716.81
8.0.50.0070.00017.01
8.0.30.0110.00817.06
8.0.20.0160.01117.40
8.0.10.0000.00917.00
8.0.00.0140.00816.97
7.4.330.0050.00015.07
7.4.320.0070.00316.61
7.4.300.0030.00316.53
7.4.290.0030.00316.60
7.4.280.0070.00416.43
7.4.270.0030.00316.56
7.4.260.0000.00716.54
7.4.250.0030.00516.49
7.4.240.0030.00316.64
7.4.230.0000.00716.73
7.4.220.0120.00616.50
7.4.210.0140.00016.52
7.4.200.0000.00716.66
7.4.160.0140.00516.41
7.4.150.0110.00617.40
7.4.140.0070.01217.86
7.4.130.0100.01116.64
7.4.120.0110.00816.59
7.4.110.0080.01116.42
7.4.100.0070.01116.57
7.4.90.0090.00616.72
7.4.80.0060.01319.39
7.4.70.0080.01116.56
7.4.60.0040.01416.41
7.4.50.0000.00516.38
7.4.40.0080.01316.49
7.4.30.0120.00816.33
7.4.00.0030.01015.07
7.3.330.0000.00613.29
7.3.320.0000.00613.14
7.3.310.0070.00016.17
7.3.300.0060.00316.29
7.3.290.0000.00716.27
7.3.280.0110.00816.20
7.3.270.0070.01017.40
7.3.260.0120.00616.40
7.3.250.0150.00316.29
7.3.240.0060.01016.33
7.3.230.0100.00716.39
7.3.210.0120.00416.52
7.3.200.0100.01019.39
7.3.190.0040.01216.49
7.3.180.0110.01116.44
7.3.170.0120.00616.27
7.3.160.0040.01216.48
7.2.330.0150.00616.77
7.2.320.0110.01116.70
7.2.310.0170.00016.58
7.2.300.0150.00416.69
7.2.290.0090.00916.74
7.2.60.0120.00316.71
7.2.00.0000.00919.26
7.1.200.0100.00315.66
7.1.100.0040.00717.95
7.1.70.0000.00717.29
7.1.60.0070.01719.57
7.1.50.0130.01016.76
7.1.00.0030.07022.32
7.0.200.0000.00716.55
7.0.140.0000.03722.12
7.0.60.0100.07019.95
7.0.50.0030.04717.89
7.0.40.0100.05020.27
7.0.30.0570.06720.21
7.0.20.0270.07720.34
7.0.10.0100.08020.07
7.0.00.0070.08320.30
5.6.280.0000.07721.05
5.6.210.0070.06320.73
5.6.200.0100.03318.24
5.6.190.0030.07320.41
5.6.180.0170.04720.46
5.6.170.0300.07320.56
5.6.160.0000.07020.70
5.6.150.0070.05018.18
5.6.140.0100.03718.12
5.6.130.0070.08318.24
5.6.120.0070.05321.10
5.6.110.0000.08721.04
5.6.100.0130.08020.98
5.6.90.0130.07721.04
5.6.80.0100.08020.38
5.6.70.4270.04020.50
5.5.350.0000.08720.43
5.5.340.0030.08018.03
5.5.330.0030.04020.19
5.5.320.0100.04320.38
5.5.310.0300.06020.27
5.5.300.0030.05017.98
5.5.290.0030.04717.98
5.5.280.0070.06020.65
5.5.270.0100.04320.79
5.5.260.0030.04020.95
5.5.250.0030.04320.47
5.5.240.0270.04020.15
5.4.450.0170.06719.46
5.4.440.0870.06019.38
5.4.430.0030.08019.57
5.4.420.0670.06719.60
5.4.410.1170.05019.31
5.4.400.0830.05719.28
5.4.390.0470.05019.28
5.4.380.0170.05318.48
5.4.370.0330.04318.50
5.4.360.0470.06018.61
5.4.350.0370.06018.73
5.4.340.0670.06318.78
5.4.320.0470.04718.73
5.4.310.0270.05718.77
5.4.300.0270.06018.70
5.4.290.0400.05018.57
5.4.280.0330.05318.52
5.4.270.0270.06018.82
5.4.260.0230.06318.46
5.4.250.0230.05718.82
5.4.240.0370.05018.60
5.4.230.0270.05318.67
5.4.220.0300.08018.73
5.4.210.0430.06318.67
5.4.200.0470.06016.58
5.4.190.0470.05018.73
5.4.180.0330.05018.52
5.4.170.0230.06318.77
5.4.160.0300.05018.48
5.4.150.0330.05318.74
5.4.140.0330.05316.20
5.4.130.0230.05716.20
5.4.120.0300.05016.32
5.4.110.0330.04316.21
5.4.100.0270.05016.27
5.4.90.0430.04716.32
5.4.80.0270.05316.40
5.4.70.0330.06716.29
5.4.60.0430.06316.16
5.4.50.0330.04316.39
5.4.40.0130.07016.15
5.4.30.0270.06016.38
5.4.20.0270.05716.16
5.4.10.0230.05716.16
5.4.00.0330.05015.62
5.3.290.0370.05014.80
5.3.280.0470.04014.62
5.3.270.0270.06014.75
5.3.260.0330.05314.62
5.3.250.0470.04314.73
5.3.240.0300.04314.59
5.3.230.0330.06314.65
5.3.220.0270.05714.63
5.3.210.0330.04714.60
5.3.200.0270.05314.61
5.3.190.0230.05714.70
5.3.180.0270.05714.75
5.3.170.0300.05714.55
5.3.160.0470.05014.57
5.3.150.0270.05314.70
5.3.140.0270.05314.77
5.3.130.0300.06014.59
5.3.120.0230.06014.75
5.3.110.0300.05314.55
5.3.100.0330.05314.10
5.3.90.0200.05314.02
5.3.80.0270.05714.09
5.3.70.0300.05714.05
5.3.60.0230.05714.04
5.3.50.0230.05313.98
5.3.40.0100.05713.93
5.3.30.0170.05313.98
5.3.20.0270.04713.86
5.3.10.0400.03713.88
5.3.00.0230.05013.75
5.2.170.0300.03311.25
5.2.160.0300.03311.25
5.2.150.0300.04011.20
5.2.140.0230.04311.24
5.2.130.0200.04311.23
5.2.120.0200.03711.20
5.2.110.0230.04311.22
5.2.100.0300.04011.08
5.2.90.0370.03711.23
5.2.80.0270.04011.17
5.2.70.0230.05011.20
5.2.60.0200.05011.09
5.2.50.0100.05011.06
5.2.40.0170.03711.10
5.2.30.0200.03011.05
5.2.20.0330.03710.96
5.2.10.0170.04311.08
5.2.00.0200.04010.82
5.1.60.0130.03710.04
5.1.50.0100.03710.11
5.1.40.0070.04010.18
5.1.30.0070.04010.55
5.1.20.0030.04310.33
5.1.10.0200.03710.09
5.1.00.0130.04310.09
5.0.50.0100.0308.57
5.0.40.0530.0238.59
5.0.30.0130.0408.41
5.0.20.0070.0308.31
5.0.10.0070.0308.29
5.0.00.0070.0578.20
4.4.90.0100.0275.91
4.4.80.0070.0236.02
4.4.70.0130.0205.91
4.4.60.0070.0235.90
4.4.50.0130.0205.94
4.4.40.0030.0375.91
4.4.30.0170.0205.95
4.4.20.0170.0176.05
4.4.10.0170.0176.07
4.4.00.0100.0406.04
4.3.110.0100.0235.92
4.3.100.0170.0175.91
4.3.90.0170.0135.83
4.3.80.0130.0305.82
4.3.70.0070.0275.84
4.3.60.0030.0275.81
4.3.50.0100.0235.82
4.3.40.0030.0475.75
4.3.30.0070.0275.37
4.3.20.0070.0305.37
4.3.10.0100.0275.37
4.3.00.0200.02715.15

preferences:
34.63 ms | 401 KiB | 5 Q