3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'Stack Over Flow Abcpqr (UR)', 'Fluency in English Conversation Defklmno (1WIR)', 'English Proficiency GHI (2WIR)', 'Testing ADG (3WIR)', ]; function implodeNotLastTwoElements($string) { $array = explode(' ', $string); return [implode(' ', array_slice($array, 0, -2))] + array_slice($array, -3); } foreach ($strings as $string) { echo json_encode(implodeNotLastTwoElements($string)) . "\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.4.120.0110.00822.18
8.4.110.0110.00918.71
8.4.100.0130.00717.66
8.4.90.0120.00820.57
8.4.80.0140.00419.16
8.4.70.0110.00818.98
8.4.60.0100.01120.40
8.4.50.0090.00818.79
8.4.40.0030.01219.52
8.4.30.0080.01120.55
8.4.20.0130.00617.71
8.4.10.0060.00920.33
8.3.250.0110.00718.59
8.3.240.0140.00516.76
8.3.230.0040.00516.61
8.3.220.0130.00618.88
8.3.210.0100.00816.41
8.3.200.0050.00416.39
8.3.190.0080.00617.11
8.3.180.0090.00918.75
8.3.170.0150.00017.24
8.3.160.0110.00318.32
8.3.150.0150.00316.61
8.3.140.0040.00416.47
8.3.130.0060.00318.51
8.3.120.0000.00818.94
8.3.110.0070.00420.94
8.3.100.0060.00316.63
8.3.90.0060.00318.18
8.3.80.0030.00618.30
8.3.70.0090.01216.73
8.3.60.0100.01018.68
8.3.50.0040.01119.98
8.3.40.0100.00718.94
8.3.30.0100.01019.09
8.3.20.0020.00524.18
8.3.10.0000.00824.66
8.3.00.0120.00626.16
8.2.290.0070.00316.45
8.2.280.0140.00618.39
8.2.270.0110.00716.44
8.2.260.0150.00317.33
8.2.250.0060.00316.52
8.2.240.0030.00518.23
8.2.230.0030.00622.58
8.2.220.0080.00024.06
8.2.210.0090.00926.77
8.2.200.0030.00616.50
8.2.190.0100.01016.58
8.2.180.0150.00425.92
8.2.170.0160.00319.08
8.2.160.0030.01222.96
8.2.150.0150.00025.66
8.2.140.0040.00424.66
8.2.130.0090.00626.16
8.2.120.0060.01026.16
8.2.110.0000.01021.03
8.2.100.0060.00617.84
8.2.90.0000.00919.83
8.2.80.0050.00317.97
8.2.70.0090.00017.63
8.2.60.0060.00317.38
8.2.50.0030.00617.98
8.2.40.0030.00518.34
8.2.30.0040.00418.25
8.2.20.0040.00420.50
8.2.10.0070.00018.01
8.2.00.0000.00719.28
8.1.330.0120.00816.34
8.1.320.0100.00917.82
8.1.310.0090.00618.46
8.1.300.0160.00317.79
8.1.290.0030.00618.88
8.1.280.0070.01125.92
8.1.270.0110.00723.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.43
8.1.230.0080.00419.09
8.1.220.0080.00017.78
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0030.00617.22
8.1.180.0050.00318.10
8.1.170.0000.00717.62
8.1.160.0040.00418.89
8.1.150.0050.00218.59
8.1.140.0080.00417.50
8.1.130.0030.00518.90
8.1.120.0070.00017.41
8.1.110.0040.00417.35
8.1.100.0100.00017.47
8.1.90.0030.00617.48
8.1.80.0040.00417.34
8.1.70.0030.00317.28
8.1.60.0070.00017.57
8.1.50.0050.00317.50
8.1.40.0040.00417.50
8.1.30.0040.00417.60
8.1.20.0040.00417.51
8.1.10.0000.00817.50
8.1.00.0050.00317.41
8.0.300.0000.00720.07
8.0.290.0070.00016.75
8.0.280.0030.00518.45
8.0.270.0030.00516.86
8.0.260.0060.00018.50
8.0.250.0070.00017.03
8.0.240.0000.00716.97
8.0.230.0000.00717.06
8.0.220.0040.00417.02
8.0.210.0030.00316.89
8.0.200.0030.00317.05
8.0.190.0080.00017.00
8.0.180.0070.00016.96
8.0.170.0060.00316.99
8.0.160.0070.00016.92
8.0.150.0000.00716.84
8.0.140.0000.00816.86
8.0.130.0040.00416.82
8.0.120.0060.00316.91
8.0.110.0080.00016.95
8.0.100.0000.00816.91
8.0.90.0040.00416.86
8.0.80.0080.00016.82
8.0.70.0040.00416.90
8.0.60.0070.00016.76
8.0.50.0000.00816.83
8.0.30.0000.00716.92
8.0.20.0040.00417.03
8.0.10.0030.00516.99
7.4.330.0060.00015.55
7.4.320.0060.00016.59
7.4.300.0000.00816.46
7.4.290.0080.00416.44
7.4.280.0070.00016.41
7.4.270.0080.00016.59
7.4.260.0030.00316.63
7.4.250.0070.00016.61
7.4.240.0030.00316.56
7.4.230.0030.00316.41
7.4.220.0000.00716.52
7.4.210.0030.00316.41
7.4.200.0070.00016.61
7.4.190.0030.00316.62
7.4.180.0030.00316.63
7.4.160.0070.00016.57
7.4.150.0000.00816.52
7.4.140.0050.00316.29
7.4.130.0000.00816.33
7.4.120.0000.00716.49
7.4.110.0040.00416.52
7.4.100.0030.00316.53
7.4.90.0030.00316.36
7.4.80.0030.00316.37
7.4.70.0030.00316.41
7.4.60.0060.00016.42
7.4.50.0050.00216.27
7.4.40.0000.00816.41
7.4.30.0060.00016.38
7.4.20.0070.00016.34
7.4.10.0030.00316.33
7.4.00.0070.00016.51

preferences:
117.72 ms | 403 KiB | 5 Q