3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tag_merge_count = 50000; $a = []; $b = ['foo', 'bar', 'baz']; $c = ['llamas', 'are', 'awesome']; $iterations = $tag_merge_count/4; for ($i = 0; $i < $iterations; $i++) { array_unique(array_merge($a, $b)); // empty + non-empty array_unique(array_merge($b, $a)); // non-empty + empty array_unique(array_merge($b, $b)); // non-empty + non-empty, with 100% collision array_unique(array_merge($b, $c)); // non-empty + non-empty, with 0% collision }

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.0100.01416.38
8.3.50.0130.02322.78
8.3.40.0100.01918.54
8.3.30.0070.01718.71
8.3.20.0040.02220.33
8.3.10.0060.00623.56
8.3.00.0080.00419.79
8.2.180.0120.01218.16
8.2.170.0100.01322.96
8.2.160.0120.00920.39
8.2.150.0030.01024.18
8.2.140.0060.00624.66
8.2.130.0060.00626.16
8.2.120.0030.01020.98
8.2.110.0040.01520.35
8.2.100.0030.01617.85
8.2.90.0040.01218.34
8.2.80.0030.01218.98
8.2.70.0030.01318.03
8.2.60.0060.00917.93
8.2.50.0000.01518.10
8.2.40.0030.01222.14
8.2.30.0030.01221.14
8.2.20.0040.01117.68
8.2.10.0040.01118.00
8.2.00.0030.01218.06
8.1.280.0030.02025.92
8.1.270.0030.00923.96
8.1.260.0030.00926.35
8.1.250.0060.00628.09
8.1.240.0040.01522.14
8.1.230.0060.01220.75
8.1.220.0060.00917.74
8.1.210.0030.01218.84
8.1.200.0090.00917.36
8.1.190.0040.01117.35
8.1.180.0030.01218.10
8.1.170.0030.01218.53
8.1.160.0000.01422.15
8.1.150.0100.00718.73
8.1.140.0040.01119.56
8.1.130.0030.01017.68
8.1.120.0000.01517.30
8.1.110.0040.01117.29
8.1.100.0080.00517.41
8.1.90.0060.01517.37
8.1.80.0040.01117.39
8.1.70.0040.01117.38
8.1.60.0030.01417.57
8.1.50.0000.01917.44
8.1.40.0000.01717.48
8.1.30.0000.01717.57
8.1.20.0040.01417.65
8.1.10.0000.01717.56
8.1.00.0030.01717.34
8.0.300.0060.01019.96
8.0.290.0040.01216.75
8.0.280.0030.01018.44
8.0.270.0000.01417.26
8.0.260.0000.01417.20
8.0.250.0030.01216.89
8.0.240.0000.01416.95
8.0.230.0000.01416.82
8.0.220.0030.01016.80
8.0.210.0000.01416.92
8.0.200.0070.00716.85
8.0.190.0090.00916.90
8.0.180.0070.01016.87
8.0.170.0040.01416.77
8.0.160.0030.01316.67
8.0.150.0030.01416.82
8.0.140.0060.01716.77
8.0.130.0030.01213.20
8.0.120.0040.01416.65
8.0.110.0030.01416.73
8.0.100.0100.00716.80
8.0.90.0030.01316.78
8.0.80.0090.03216.81
8.0.70.0000.02016.72
8.0.60.0030.01316.78
8.0.50.0100.00716.82
8.0.30.0110.01617.01
8.0.20.0120.03017.40
8.0.10.0000.01716.96
8.0.00.0040.02516.76
7.4.330.0000.01215.08
7.4.320.0030.01016.46
7.4.300.0000.01416.60
7.4.290.0070.01016.56
7.4.280.0060.01316.43
7.4.270.0060.01216.45
7.4.260.0000.01716.58
7.4.250.0000.01716.39
7.4.240.0030.01616.57
7.4.230.0000.01616.67
7.4.220.0080.03516.59
7.4.210.0090.02516.44
7.4.200.0030.01416.60
7.4.160.0090.01716.41
7.4.150.0120.02017.40
7.4.140.0160.01317.86
7.4.130.0100.02516.47
7.4.120.0100.02216.45
7.4.110.0090.02116.36
7.4.100.0090.01916.22
7.4.90.0090.01916.43
7.4.80.0100.01719.39
7.4.70.0090.01816.64
7.4.60.0090.03516.32
7.4.50.0080.01416.50
7.4.40.0160.01216.52
7.4.30.0130.01616.67
7.4.00.0050.02614.91
7.3.330.0100.01313.28
7.3.320.0030.01413.23
7.3.310.0070.01316.40
7.3.300.0030.01616.24
7.3.290.0100.02016.35
7.3.280.0120.02516.32
7.3.270.0070.02317.40
7.3.260.0050.02716.42
7.3.250.0110.02416.58
7.3.240.0060.02316.46
7.3.230.0060.02716.52
7.3.210.0090.02316.41
7.3.200.0140.01516.54
7.3.190.0070.02216.61
7.3.180.0070.02416.55
7.3.170.0090.02216.59
7.3.160.0170.02716.38
7.3.120.0100.02115.00
7.3.110.0070.02014.91
7.3.100.0110.02514.61
7.3.90.0100.02314.83
7.3.80.0030.02614.87
7.3.70.0070.02014.88
7.3.60.0070.02014.97
7.3.50.0070.02014.89
7.3.40.0000.03014.71
7.3.30.0060.01914.52
7.3.20.0030.02716.67
7.3.10.0000.02116.64
7.3.00.0120.01816.72
7.2.330.0060.02616.39
7.2.320.0090.02516.69
7.2.310.0110.02116.24
7.2.300.0040.02916.63
7.2.290.0110.01916.47
7.2.250.0100.02914.98
7.2.240.0060.02514.77
7.2.230.0100.03014.73
7.2.220.0030.02714.85
7.2.210.0150.01515.24
7.2.200.0000.02914.84
7.2.190.0060.02215.05
7.2.180.0100.01714.75
7.2.170.0060.02314.93
7.2.80.0030.01716.63
7.2.60.0140.01416.79
7.2.00.0030.01719.38
7.1.330.0000.03815.85
7.1.320.0030.03315.65
7.1.310.0070.03315.70
7.1.300.0030.02915.83
7.1.290.0030.03315.73
7.1.280.0030.03315.88
7.1.270.0000.03615.84
7.1.260.0070.03415.95
7.1.200.0060.02215.75
7.1.70.0070.02117.36
7.1.60.0130.01619.75
7.1.00.0070.09722.31
7.0.200.0370.01714.82
7.0.90.1000.00019.93
7.0.80.0930.00020.01
7.0.70.0970.00019.91
7.0.60.1070.00019.99
7.0.50.1470.00020.30
7.0.40.1270.00020.29
7.0.30.1570.00020.28
7.0.20.1230.00020.31
7.0.10.1130.00020.30
7.0.00.1170.00020.38
5.6.240.1400.00020.65
5.6.230.1370.00020.63
5.6.220.1930.00020.55
5.6.210.1600.00020.71
5.6.200.1530.00021.12
5.6.190.1570.00021.09
5.6.180.1370.00020.98
5.6.170.1370.00021.12
5.6.160.1530.00021.13
5.6.150.1400.00021.09
5.6.140.1370.00021.01
5.6.130.1270.00021.08
5.6.120.1270.00021.16
5.6.110.1300.00021.07
5.6.100.1500.00021.08
5.6.90.1800.00021.07
5.6.80.1270.00020.47
5.6.70.1330.00020.38
5.6.60.1400.00020.36
5.6.50.1470.00020.55
5.6.40.1170.00020.34
5.6.30.1400.00020.49
5.6.20.1200.00020.52
5.6.10.1200.00020.44
5.6.00.1300.00020.47

preferences:
68.09 ms | 401 KiB | 5 Q