3v4l.org

run code in 300+ PHP versions simultaneously
<?php $FILE[0] = ['artist' => 'a,b']; $FILE[1] = ['artist' => 'c']; $merged = []; for($i=0;$i<2;$i++) { $artist = explode(',', $FILE[$i]['artist']); // Because Artist names saved like this `A,B` in first row and `A,B,C` in second. $merged = array_unique(array_merge($merged, $artist)); } print_r($merged);

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.5.30.0070.01119.48
8.5.20.0090.00719.58
8.5.10.0100.00819.30
8.5.00.0150.00719.90
8.4.180.0120.01019.70
8.4.170.0170.00520.60
8.4.160.0120.01023.86
8.4.150.0080.00516.86
8.4.140.0100.01017.51
8.4.130.0150.00717.85
8.4.120.0100.01120.74
8.4.110.0140.00722.40
8.4.100.0100.01018.96
8.4.90.0120.00822.42
8.4.80.0110.00918.41
8.4.70.0090.01217.69
8.4.60.0070.00920.39
8.4.50.0130.00719.32
8.4.40.0140.00019.26
8.4.30.0110.00720.86
8.4.20.0100.01019.51
8.4.10.0000.00919.55
8.3.300.0120.00820.83
8.3.290.0070.01320.87
8.3.280.0120.00918.34
8.3.270.0130.00716.66
8.3.260.0070.01216.32
8.3.250.0100.00820.82
8.3.240.0110.00916.66
8.3.230.0130.00916.45
8.3.220.0050.00319.03
8.3.210.0100.01016.44
8.3.200.0050.00417.10
8.3.190.0050.01018.00
8.3.180.0060.00318.93
8.3.170.0030.00616.38
8.3.160.0110.00717.06
8.3.150.0160.00316.58
8.3.140.0040.00419.03
8.3.130.0140.00316.68
8.3.120.0110.00419.02
8.3.110.0090.00020.94
8.3.100.0090.00024.06
8.3.90.0070.00726.77
8.3.80.0040.00717.97
8.3.70.0090.00618.18
8.3.60.0040.01216.75
8.3.50.0120.00621.14
8.3.40.0120.00318.84
8.3.30.0070.01018.81
8.3.20.0000.00820.16
8.3.10.0060.00319.94
8.3.00.0000.00823.63
8.2.300.0090.01021.98
8.2.290.0100.00820.53
8.2.280.0040.00418.44
8.2.270.0060.01216.86
8.2.260.0040.00416.55
8.2.250.0000.00818.58
8.2.240.0030.00519.11
8.2.230.0090.00622.58
8.2.220.0090.00037.54
8.2.210.0070.00726.77
8.2.200.0060.00318.41
8.2.190.0070.00716.75
8.2.180.0110.00416.37
8.2.170.0040.01122.96
8.2.160.0060.00920.44
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00020.35
8.2.120.0050.00326.35
8.2.110.0070.00421.02
8.2.100.0070.00717.59
8.2.90.0040.00419.21
8.2.80.0060.00617.97
8.2.70.0060.00317.63
8.2.60.0030.00618.04
8.2.50.0060.00318.07
8.2.40.0030.00518.09
8.2.30.0040.00417.92
8.2.20.0040.00417.94
8.2.10.0040.00418.07
8.2.00.0040.00418.25
8.1.340.0090.01117.55
8.1.330.0120.00722.03
8.1.320.0120.00816.19
8.1.310.0050.00316.34
8.1.300.0040.00420.29
8.1.290.0040.00430.84
8.1.280.0090.00625.92
8.1.270.0030.01022.14
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00319.38
8.1.230.0090.00319.07
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.10
8.1.180.0060.00318.10
8.1.170.0040.00418.91
8.1.160.0040.00418.86
8.1.150.0040.00420.28
8.1.140.0000.00719.58
8.1.130.0000.00618.89
8.1.120.0040.00417.25
8.1.110.0000.00917.27
8.1.100.0060.00317.39
8.1.90.0040.00417.40
8.1.80.0040.00417.46
8.1.70.0070.00017.46
8.1.60.0050.00217.45
8.1.50.0000.00817.45
8.1.40.0040.00417.36
8.1.30.0080.00017.59
8.1.20.0060.00317.46
8.1.10.0000.00717.44
8.1.00.0000.00717.49
8.0.300.0040.00418.78
8.0.290.0040.00416.63
8.0.280.0030.00318.38
8.0.270.0000.00816.65
8.0.260.0030.00317.10
8.0.250.0030.00316.83
8.0.240.0020.00516.77
8.0.230.0030.00316.91
8.0.220.0000.00716.84
8.0.210.0040.00416.84
8.0.200.0050.00316.80
8.0.190.0000.00816.89
8.0.180.0040.00416.88
8.0.170.0070.00016.86
8.0.160.0030.00316.78
8.0.150.0000.00816.70
8.0.140.0070.00316.79
8.0.130.0060.00313.21
8.0.120.0000.00716.74
8.0.110.0000.00716.64
8.0.100.0070.00016.82
8.0.90.0030.00516.72
8.0.80.0120.00416.78
8.0.70.0000.00716.89
8.0.60.0020.00516.85
8.0.50.0000.00716.66
8.0.30.0090.01017.05
8.0.20.0110.00717.40
8.0.10.0070.00016.99
8.0.00.0130.00416.76
7.4.330.0020.00215.55
7.4.320.0050.00216.55
7.4.300.0060.00016.55
7.4.290.0070.00016.34
7.4.280.0000.00716.44
7.4.270.0040.00416.47
7.4.260.0030.00316.52
7.4.250.0040.00416.39
7.4.240.0040.00416.47
7.4.230.0040.00416.61
7.4.220.0120.00916.58
7.4.210.0070.01016.39
7.4.200.0030.00316.33
7.4.160.0080.00816.43
7.4.150.0080.00817.40
7.4.140.0090.01017.86
7.4.130.0080.01016.50
7.4.120.0120.00816.53
7.4.110.0090.00916.33
7.4.100.0060.00916.55
7.4.90.0070.01016.48
7.4.80.0030.01319.39
7.4.70.0090.00916.21
7.4.60.0120.00316.33
7.4.50.0120.00616.39
7.4.40.0100.00616.39
7.4.30.0100.01016.41
7.4.00.0030.00914.96
7.3.330.0050.00313.05
7.3.320.0050.00013.15
7.3.310.0000.00816.27
7.3.300.0070.00016.25
7.3.290.0060.01016.36
7.3.280.0090.01116.35
7.3.270.0100.00717.40
7.3.260.0160.00216.39
7.3.250.0080.01016.31
7.3.240.0080.00916.42
7.3.230.0140.00516.39
7.3.210.0030.01316.30
7.3.200.0090.00916.43
7.3.190.0070.01016.61
7.3.180.0060.01016.50
7.3.170.0060.01216.31
7.3.160.0100.00616.21
7.3.10.0030.01016.32
7.3.00.0100.00016.15
7.2.330.0110.00716.77
7.2.320.0070.00716.63
7.2.310.0150.00616.52
7.2.300.0110.00716.77
7.2.290.0070.01016.61
7.2.130.0060.00616.99
7.2.120.0030.00716.52
7.2.110.0070.00716.73
7.2.100.0080.00416.72
7.2.90.0080.00316.71
7.2.80.0070.00316.88
7.2.70.0000.01316.75
7.2.60.0040.00716.71
7.2.50.0120.00216.84
7.2.40.0000.01217.07
7.2.30.0030.00916.66
7.2.20.0000.01516.86
7.2.10.0070.00716.78
7.2.00.0060.00316.68
7.1.250.0060.00315.66
7.1.200.0030.00715.64
7.1.70.0060.00617.15
7.1.60.0040.00717.12
7.1.30.2730.06036.50
7.1.20.2800.05336.46
7.1.10.1770.06720.39
7.1.00.1600.06020.46
7.0.200.0040.01116.79
7.0.170.2230.06020.02
7.0.160.2370.06320.02
7.0.150.1870.06019.99
7.0.140.1570.06320.04
7.0.130.2970.07020.00
7.0.120.1930.07019.96
7.0.110.2070.06020.04
7.0.100.1630.06320.13
7.0.90.1530.06720.04
7.0.80.1670.06020.12
7.0.70.1830.07019.99
7.0.60.1800.06320.10
7.0.50.1730.06720.05
7.0.40.2300.07020.09
7.0.30.1900.06020.07
7.0.20.1570.06320.05
7.0.10.1370.05320.06
7.0.00.1570.06319.96

preferences:
53.75 ms | 1493 KiB | 5 Q