3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Super this is a test this is a test'; $arr = explode(' ', $string); $vals = array_count_values($arr); foreach ($arr as $key => $word) { if ($vals[$word] > 1) { unset($arr[$key]); } } echo implode(' ', $arr);

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.4.10.0060.00319.63
8.3.140.0070.00316.69
8.3.130.0060.00318.59
8.3.120.0120.00620.66
8.3.110.0040.01216.41
8.3.100.0110.00416.86
8.3.90.0030.00616.63
8.3.80.0030.00619.36
8.3.70.0070.00718.43
8.3.60.0180.00318.56
8.3.50.0050.00824.44
8.3.40.0070.00819.53
8.3.30.0090.00618.94
8.3.20.0060.00821.35
8.3.10.0050.00621.03
8.3.00.0100.00120.60
8.2.260.0140.00418.76
8.2.250.0080.00018.54
8.2.240.0000.00917.15
8.2.230.0040.01120.94
8.2.220.0000.00816.34
8.2.210.0120.00026.77
8.2.200.0060.00316.38
8.2.190.0000.01518.37
8.2.180.0030.01216.75
8.2.170.0090.00721.00
8.2.160.0120.00320.49
8.2.150.0070.00521.66
8.2.140.0060.00522.46
8.2.130.0050.00623.28
8.2.120.0070.00519.28
8.2.110.0070.00719.39
8.2.100.0070.00519.33
8.2.90.0050.00719.71
8.2.80.0100.00218.69
8.2.70.0060.00618.19
8.2.60.0050.00718.19
8.2.50.0030.00818.60
8.2.40.0070.00518.46
8.2.30.0080.00319.18
8.2.20.0050.00718.47
8.2.10.0060.00619.09
8.2.00.0050.00719.03
8.1.310.0070.00716.47
8.1.300.0150.00619.98
8.1.290.0030.00618.88
8.1.280.0030.01425.92
8.1.270.0070.00421.42
8.1.260.0090.00324.21
8.1.250.0060.00625.04
8.1.240.0080.00421.30
8.1.230.0070.00718.77
8.1.220.0070.00518.22
8.1.210.0080.00418.64
8.1.200.0080.00318.21
8.1.190.0080.00417.76
8.1.180.0020.01218.17
8.1.170.0030.00818.21
8.1.160.0080.00320.14
8.1.150.0050.00618.88
8.1.140.0090.00418.81
8.1.130.0060.00719.40
8.1.120.0060.00718.07
8.1.110.0060.00718.00
8.1.100.0070.00718.56
8.1.90.0080.00517.93
8.1.80.0030.00918.53
8.1.70.0050.00618.10
8.1.60.0080.00318.03
8.1.50.0080.00518.02
8.1.40.0070.00517.90
8.1.30.0050.00618.14
8.1.20.0030.00918.68
8.1.10.0100.00218.02
8.1.00.0060.00618.09
8.0.300.0080.00518.26
8.0.290.0090.00317.15
8.0.280.0080.00518.03
8.0.270.0050.00717.88
8.0.260.0080.00619.06
8.0.250.0100.00617.38
8.0.240.0100.00517.33
8.0.230.0130.00417.31
8.0.220.0140.00317.28
8.0.210.0100.00817.21
8.0.200.0070.00917.31
8.0.190.0120.00417.29
8.0.180.0100.00417.32
8.0.170.0130.00417.25
8.0.160.0110.00617.35
8.0.150.0110.00517.31
8.0.140.0160.00317.29
8.0.130.0110.00415.54
8.0.120.0080.00817.23
8.0.110.0120.00517.30
8.0.100.0160.00017.37
8.0.90.0120.00517.29
8.0.80.0120.00617.20
8.0.70.0090.00217.35
8.0.60.0130.00217.38
8.0.50.0110.00517.26
8.0.30.0090.00717.42
8.0.20.0130.00817.35
8.0.10.0130.00317.53
8.0.00.0070.01118.08
7.4.330.0110.00216.35
7.4.320.0110.00516.89
7.4.300.0150.00217.04
7.4.290.0170.00117.03
7.4.280.0080.00916.86
7.4.270.0100.00816.95
7.4.260.0100.00815.37
7.4.250.0180.00216.94
7.4.240.0170.00316.91
7.4.230.0140.00616.79
7.4.220.0120.00216.78
7.4.210.0110.00716.69
7.4.200.0120.00816.84
7.4.190.0240.00617.31
7.4.180.0230.00417.92
7.4.160.0200.00817.47
7.4.150.0250.00317.32
7.4.140.0200.00817.19
7.4.130.0140.00916.84
7.4.120.0160.00716.94
7.4.110.0130.00916.89
7.4.100.0170.00516.80
7.4.90.0190.00516.94
7.4.80.0160.00718.37
7.4.70.0120.00916.81
7.4.60.0190.00317.07
7.4.50.0150.00616.82
7.4.40.0150.00716.89
7.4.30.0110.01116.96
7.4.20.0170.00716.68
7.4.10.0150.00716.76
7.4.00.0200.00517.00
7.3.330.0090.00716.77
7.3.320.0100.00614.93
7.3.310.0090.00916.63
7.3.300.0110.00416.89
7.3.290.0070.01116.49
7.3.280.0250.00316.79
7.3.270.0210.00416.89
7.3.260.0140.00716.64
7.3.250.0230.00616.88
7.3.240.0120.00916.49
7.3.230.0170.00516.73
7.3.220.0220.00417.04
7.3.210.0190.00316.92
7.3.200.0210.00316.78
7.3.190.0130.00916.95
7.3.180.0180.00916.73
7.3.170.0110.01217.14
7.3.160.0180.00816.71
7.3.150.0180.00716.74
7.3.140.0150.01116.69
7.3.130.0200.00416.71
7.3.120.0140.00816.70
7.3.110.0110.01116.93
7.3.100.0150.00716.63
7.3.90.0170.00616.91
7.3.80.0130.00816.57
7.3.70.0170.00317.35
7.3.60.0160.00616.86
7.3.50.0130.00716.63
7.3.40.0100.01416.87
7.3.30.0120.01316.93
7.3.20.0160.01017.70
7.3.10.0160.00717.78
7.3.00.0170.00717.76
7.2.340.0130.01317.12
7.2.330.0180.01016.94
7.2.320.0250.00317.16
7.2.310.0130.00816.79
7.2.300.0140.00916.96
7.2.290.0110.01216.91
7.2.280.0170.00616.94
7.2.270.0200.00516.94
7.2.260.0130.01317.10
7.2.250.0100.01316.84
7.2.240.0170.00817.09
7.2.230.0140.01017.00
7.2.220.0160.00616.95
7.2.210.0120.01217.11
7.2.200.0170.00616.99
7.2.190.0120.00916.84
7.2.180.0150.01117.05
7.2.170.0170.00817.08
7.2.160.0160.01117.01
7.2.150.0190.00418.04
7.2.140.0160.00917.90
7.2.130.0140.01318.04
7.2.120.0200.00518.07
7.2.110.0200.00518.06
7.2.100.0170.00817.92
7.2.90.0210.00317.97
7.2.80.0160.00717.98
7.2.70.0180.00717.96
7.2.60.0230.00318.04
7.2.50.0150.01117.88
7.2.40.0170.00918.12
7.2.30.0180.00518.00
7.2.20.0150.00618.08
7.2.10.0180.00518.06
7.2.00.0450.00818.05

preferences:
29.01 ms | 403 KiB | 5 Q