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); array_splice($array, 0, -2, implode(' ', array_slice($array, 0, -2))); return $array; } 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.5.00.0100.01019.76
8.4.150.0020.00014.05
8.4.140.0120.00817.38
8.4.130.0110.00818.66
8.4.120.0100.01023.87
8.4.110.0100.01018.95
8.4.100.0090.00718.47
8.4.90.0120.00822.38
8.4.80.0040.00417.77
8.4.70.0170.00317.69
8.4.60.0100.01118.86
8.4.50.0050.00317.76
8.4.40.0140.00719.50
8.4.30.0130.00618.52
8.4.20.0000.01418.01
8.4.10.0100.00720.23
8.3.280.0110.01118.33
8.3.270.0070.01316.80
8.3.260.0100.01016.53
8.3.250.0050.00318.84
8.3.240.0100.00717.26
8.3.230.0100.01116.46
8.3.220.0090.01019.07
8.3.210.0080.01116.84
8.3.200.0100.00916.67
8.3.190.0080.00717.01
8.3.180.0030.00420.84
8.3.170.0120.00816.53
8.3.160.0040.01416.42
8.3.150.0090.00917.05
8.3.140.0040.00417.17
8.3.130.0000.00818.34
8.3.120.0060.00318.45
8.3.110.0000.00816.75
8.3.100.0040.00416.38
8.3.90.0050.00226.77
8.3.80.0090.00016.63
8.3.70.0040.01816.58
8.3.60.0060.00916.50
8.3.50.0070.00720.34
8.3.40.0070.01118.84
8.3.30.0130.00319.21
8.3.20.0000.00824.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0120.00720.32
8.2.280.0120.00818.15
8.2.270.0080.00816.26
8.2.260.0070.00019.07
8.2.250.0090.00016.59
8.2.240.0090.00017.32
8.2.230.0030.00620.94
8.2.220.0090.00024.06
8.2.210.0170.00026.77
8.2.200.0050.00516.38
8.2.190.0120.00316.58
8.2.180.0000.01525.92
8.2.170.0070.00718.80
8.2.160.0110.00722.96
8.2.150.0050.00325.66
8.2.140.0100.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00320.53
8.2.100.0060.00617.78
8.2.90.0060.00319.70
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0050.00317.63
8.2.50.0050.00317.98
8.2.40.0000.00818.16
8.2.30.0000.00818.31
8.2.20.0000.00720.43
8.2.10.0040.00418.05
8.2.00.0050.00219.25
8.1.330.0100.00922.00
8.1.320.0100.00916.01
8.1.310.0050.00316.77
8.1.300.0080.00019.62
8.1.290.0100.00330.84
8.1.280.0120.00625.92
8.1.270.0030.00623.88
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00318.95
8.1.230.0060.00622.18
8.1.220.0040.00417.79
8.1.210.0060.00318.77
8.1.200.0030.00617.11
8.1.190.0080.00017.22
8.1.180.0030.00618.10
8.1.170.0090.00017.62
8.1.160.0070.00018.90
8.1.150.0060.00318.57
8.1.140.0100.00017.40
8.1.130.0030.00618.80
8.1.120.0030.00317.47
8.1.110.0070.00017.48
8.1.100.0030.00717.44
8.1.90.0090.00017.42
8.1.80.0000.00717.35
8.1.70.0030.00317.31
8.1.60.0000.00717.54
8.1.50.0040.00417.56
8.1.40.0040.00417.43
8.1.30.0190.00317.60
8.1.20.0070.00717.63
8.1.10.0060.00617.45
8.1.00.0000.01217.47
8.0.300.0000.00820.09
8.0.290.0070.00016.63
8.0.280.0070.00018.35
8.0.270.0070.00016.86
8.0.260.0060.00018.49
8.0.250.0000.00716.88
8.0.240.0070.00016.97
8.0.230.0030.00316.89
8.0.220.0070.00016.81
8.0.210.0000.00816.90
8.0.200.0030.00316.95
8.0.190.0090.00016.94
8.0.180.0040.00416.93
8.0.170.0080.00016.84
8.0.160.0030.01016.76
8.0.150.0180.00016.89
8.0.140.0120.00716.82
8.0.130.0100.00516.76
8.0.120.0140.00316.81
8.0.110.0190.00016.84
8.0.100.0100.00516.75
8.0.90.0130.00316.75
8.0.80.0090.00416.84
8.0.70.0140.00416.80
8.0.60.0030.01016.73
8.0.50.0000.00816.92
8.0.30.0110.00016.71
8.0.20.0140.00616.79
8.0.10.0120.00016.95
7.4.330.0060.00015.55
7.4.320.0040.00416.64
7.4.300.0040.00416.50
7.4.290.0070.00416.52
7.4.280.0000.00916.51
7.4.270.0080.00016.50
7.4.260.0000.00816.50
7.4.250.0030.00516.63
7.4.240.0080.00016.60
7.4.230.0000.00716.64
7.4.220.0020.00516.54
7.4.210.0000.01116.59
7.4.200.0150.00416.60
7.4.190.0080.00016.57
7.4.180.0070.00016.56
7.4.160.0020.00716.54
7.4.150.0090.00316.32
7.4.140.0030.00916.55
7.4.130.0230.00016.58
7.4.120.0170.00016.37
7.4.110.0070.00416.52
7.4.100.0040.00816.54
7.4.90.0090.00616.45
7.4.80.0130.00416.43
7.4.70.0110.00416.43
7.4.60.0100.00616.46
7.4.50.0140.00016.37
7.4.40.0080.00416.26
7.4.30.0130.00016.56
7.4.20.0110.00616.41
7.4.10.0150.00416.37
7.4.00.0140.00516.37

preferences:
22.37 ms | 403 KiB | 5 Q