3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '1-string-2-string-3-string-55-otherstring-66-otherstring'; print_r(implode('-', array_reverse(array_unique(array_reverse(explode('-', $str))))));

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.130.0050.00417.64
8.4.120.0050.00422.36
8.4.110.0110.01020.23
8.4.100.0130.00917.61
8.4.90.0120.00919.34
8.4.80.0020.00617.83
8.4.70.0070.00317.48
8.4.60.0130.00718.84
8.4.50.0120.00820.26
8.4.40.0200.00017.53
8.4.30.0100.01017.42
8.4.20.0050.00517.28
8.4.10.0160.00320.89
8.3.250.0130.00718.61
8.3.240.0110.00816.59
8.3.230.0100.00916.42
8.3.220.0110.00719.01
8.3.210.0080.00518.16
8.3.200.0050.00416.64
8.3.190.0130.00616.89
8.3.180.0130.00516.29
8.3.170.0030.01417.24
8.3.160.0140.00716.43
8.3.150.0060.01220.78
8.3.140.0000.00717.20
8.3.130.0030.00618.27
8.3.120.0030.00618.59
8.3.110.0100.00620.94
8.3.100.0030.00616.38
8.3.90.0000.00826.77
8.3.80.0060.00316.38
8.3.70.0060.01216.58
8.3.60.0070.00718.43
8.3.50.0100.00517.47
8.3.40.0120.00318.67
8.3.30.0070.00718.64
8.3.20.0040.00419.03
8.3.10.0040.00421.90
8.3.00.0060.00317.90
8.2.290.0080.00518.91
8.2.280.0110.00918.12
8.2.270.0080.01117.27
8.2.260.0090.00016.33
8.2.250.0000.00716.82
8.2.240.0090.00916.99
8.2.230.0150.00022.58
8.2.220.0090.00024.06
8.2.210.0040.00426.77
8.2.200.0000.01018.28
8.2.190.0090.00916.58
8.2.180.0000.01616.48
8.2.170.0110.00422.96
8.2.160.0140.00022.96
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00420.94
8.2.110.0030.00620.34
8.2.100.0120.00019.45
8.2.90.0050.00317.63
8.2.80.0000.00818.78
8.2.70.0070.00317.50
8.2.60.0000.00817.50
8.2.50.0040.00417.55
8.2.40.0060.00319.22
8.2.30.0080.00321.23
8.2.20.0020.00517.85
8.2.10.0000.00817.86
8.2.00.0020.00519.22
8.1.330.0120.00716.31
8.1.320.0110.00716.28
8.1.310.0140.00318.48
8.1.300.0000.00918.41
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0080.00024.02
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0100.00622.18
8.1.230.0110.00017.64
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0000.00717.82
8.1.160.0000.00718.73
8.1.150.0070.00318.82
8.1.140.0000.00717.67
8.1.130.0060.00019.05
8.1.120.0090.00017.46
8.1.110.0030.00317.40
8.1.100.0040.00317.43
8.1.90.0040.00417.38
8.1.80.0070.00017.29
8.1.70.0040.00417.30
8.1.60.0060.00317.46
8.1.50.0020.00517.46
8.1.40.0040.00417.37
8.1.30.0090.00017.55
8.1.20.0040.00417.55
8.1.10.0080.00017.45
8.1.00.0030.00517.25
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00618.38
8.0.270.0000.00716.67
8.0.260.0030.00317.19
8.0.250.0040.00416.91
8.0.240.0050.00516.89
8.0.230.0060.00916.84
8.0.220.0000.00716.91
8.0.210.0000.00716.70
8.0.200.0000.00716.75
8.0.190.0030.00316.81
8.0.180.0100.00016.74
8.0.170.0040.00416.89
8.0.160.0000.00716.84
8.0.150.0070.00016.71
8.0.140.0040.00416.79
8.0.130.0030.00313.29
8.0.120.0000.00816.74
8.0.110.0040.00416.84
8.0.100.0000.00716.86
8.0.90.0030.00316.71
8.0.80.0060.00916.78
8.0.70.0040.00416.84
8.0.60.0000.00716.82
8.0.50.0050.00216.69
8.0.30.0090.01016.84
8.0.20.0100.01117.40
8.0.10.0080.00016.92
8.0.00.0070.01116.74
7.4.330.0000.00415.55
7.4.320.0030.00316.42
7.4.300.0000.00616.43
7.4.290.0070.00016.28
7.4.280.0030.00316.44
7.4.270.0040.00716.45
7.4.260.0000.00716.53
7.4.250.0030.00516.52
7.4.240.0030.00316.50
7.4.230.0040.00416.62
7.4.220.0040.00416.61
7.4.210.0060.00816.51
7.4.200.0070.00016.52
7.4.160.0130.00516.41
7.4.140.0080.01017.86
7.4.130.0140.00316.34
7.4.120.0090.01016.35
7.4.110.0160.00416.49
7.4.100.0100.01016.23
7.4.90.0110.01116.23
7.4.80.0100.00719.39
7.4.70.0130.00816.48
7.4.60.0080.00816.34
7.4.50.0070.00716.45
7.4.40.0090.00616.38
7.4.00.0090.00914.66
7.3.330.0020.00212.98
7.3.320.0000.00613.08
7.3.310.0070.00016.18
7.3.300.0040.00316.06
7.3.290.0070.00015.98
7.3.280.0130.00616.12
7.3.260.0110.00716.32
7.3.240.0130.00616.33
7.3.230.0160.00016.13
7.3.210.0100.00716.34
7.3.200.0090.00616.35
7.3.190.0070.01016.43
7.3.180.0060.00916.27
7.3.170.0120.00616.27
7.3.160.0030.01316.32
7.3.120.0120.00614.86
7.3.110.0100.00614.92
7.3.100.0040.01414.71
7.3.90.0040.00814.70
7.3.80.0000.01114.69
7.3.70.0030.00614.35
7.3.60.0060.00614.84
7.3.50.0040.00814.40
7.3.40.0070.00714.66
7.3.30.0120.00314.54
7.3.20.0030.01016.50
7.3.10.0080.00416.49
7.3.00.0040.01116.36
7.2.330.0090.00916.08
7.2.320.0060.01216.41
7.2.310.0080.01016.36
7.2.300.0150.00416.18
7.2.290.0170.00616.26
7.2.250.0040.01514.59
7.2.240.0100.00314.69
7.2.230.0110.00414.61
7.2.220.0070.00714.95
7.2.210.0040.01114.66
7.2.200.0000.01115.07
7.2.190.0070.00714.89
7.2.180.0030.01014.79
7.2.170.0000.01414.84
7.2.60.0090.00616.74
7.2.50.0130.00616.47
7.2.40.3070.01417.65
7.2.30.1550.00817.63
7.2.20.2070.00817.74
7.2.10.2570.01017.70
7.2.00.0140.01317.90
7.1.330.0070.00715.52
7.1.320.0000.01315.89
7.1.310.0030.01315.48
7.1.300.0080.00515.72
7.1.290.0060.00615.66
7.1.280.0030.01315.91
7.1.270.0110.00315.51
7.1.260.0040.00715.91
7.1.200.0000.01215.70
7.1.160.2580.01016.77
7.1.150.1950.00916.90
7.1.140.1990.01216.77
7.1.130.0150.01016.57
7.1.120.1860.01016.39
7.1.110.0090.01016.30
7.1.100.0420.00915.89
7.1.90.0180.00816.09
7.1.80.2510.00916.26
7.1.70.2440.01115.16
7.1.60.3070.01333.11
7.1.50.2560.01732.95
7.1.40.0520.01032.39
7.1.30.0310.01432.61
7.1.20.0260.01632.73
7.1.10.0070.01214.86
7.1.00.1090.01114.71

preferences:
21.51 ms | 403 KiB | 5 Q