3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this is a returned string'; $words = explode(" ", $string ); $last_two_word = implode(' ',array_splice($words, -2 )); $except_last_two = implode(' ', $words); $expected = '<p>'.$except_last_two.' <span class="someclass">'.$last_two_word.'</span></p>'; echo $expected; ?>

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.0040.00419.50
8.3.140.0120.00318.88
8.3.130.0040.00416.59
8.3.120.0060.00320.76
8.3.110.0030.00620.94
8.3.100.0040.00418.34
8.3.90.0070.00726.77
8.3.80.0070.00319.36
8.3.70.0090.00618.55
8.3.60.0090.01218.31
8.3.50.0080.00924.59
8.3.40.0110.01019.24
8.3.30.0170.00518.81
8.3.20.0060.01023.03
8.3.10.0120.00523.18
8.3.00.0090.00622.17
8.2.260.0130.00618.61
8.2.250.0040.01116.43
8.2.240.0060.00319.08
8.2.230.0040.00422.58
8.2.220.0060.00924.06
8.2.210.0000.00826.77
8.2.200.0100.00018.88
8.2.190.0040.01116.58
8.2.180.0100.00618.29
8.2.170.0110.00718.70
8.2.160.0130.00521.48
8.2.150.0090.00723.49
8.2.140.0080.00723.55
8.2.130.0090.00624.10
8.2.120.0100.00421.93
8.2.110.0080.00922.02
8.2.100.0080.01020.89
8.2.90.0110.00420.69
8.2.80.0070.00821.24
8.2.70.0110.00420.77
8.2.60.0110.00620.88
8.2.50.0100.00721.38
8.2.40.0100.00721.28
8.2.30.0090.00921.16
8.2.20.0100.00520.80
8.2.10.0090.00621.27
8.2.00.0110.00621.22
8.1.310.0090.00916.32
8.1.300.0080.00015.88
8.1.290.0110.00730.84
8.1.280.0120.00625.92
8.1.270.0110.00422.72
8.1.260.0100.00424.64
8.1.250.0050.00925.31
8.1.240.0100.00521.20
8.1.230.0120.00420.57
8.1.220.0100.00620.78
8.1.210.0110.00520.94
8.1.200.0090.00720.57
8.1.190.0120.00620.48
8.1.180.0100.00921.02
8.1.170.0080.00621.04
8.1.160.0090.00421.01
8.1.150.0080.00621.10
8.1.140.0100.00721.12
8.1.130.0030.00921.54
8.1.120.0110.00520.51
8.1.110.0120.00320.45
8.1.100.0040.01120.91
8.1.90.0090.00620.52
8.1.80.0030.01221.04
8.1.70.0060.01020.65
8.1.60.0080.00620.63
8.1.50.0080.00820.56
8.1.40.0110.00520.65
8.1.30.0040.01120.68
8.1.20.0110.00521.05
8.1.10.0090.00620.60
8.1.00.0090.00420.50
8.0.300.0070.00720.80
8.0.290.0170.00520.05
8.0.280.0150.00520.67
8.0.270.0070.00820.11
8.0.260.0170.00420.63
8.0.250.0130.00820.17
8.0.240.0120.00820.09
8.0.230.0140.00320.15
8.0.220.0150.00220.09
8.0.210.0200.00320.06
8.0.200.0110.00920.14
8.0.190.0220.00320.14
8.0.180.0090.00820.16
8.0.170.0190.00920.04
8.0.160.0140.00720.17
8.0.150.0170.00920.14
8.0.140.0180.00820.13
8.0.130.0150.00918.92
8.0.120.0190.00520.14
8.0.110.0120.00619.32
8.0.100.0110.00719.25
8.0.90.0120.00518.84
8.0.80.0110.00718.50
8.0.70.0060.00619.29
8.0.60.0140.00419.32
8.0.50.0140.00519.28
8.0.30.0090.00418.85
8.0.20.0090.00718.56
8.0.10.0100.00619.36
8.0.00.0110.00519.12
7.4.330.0080.00718.37
7.4.320.0140.00719.92
7.4.300.0150.00719.80
7.4.290.0160.00719.87
7.4.280.0160.00619.90
7.4.270.0150.00819.97
7.4.260.0180.00419.84
7.4.250.0170.00619.86
7.4.240.0110.00518.56
7.4.230.0150.00518.94
7.4.220.0110.00518.13
7.4.210.0130.00717.72
7.4.200.0130.00719.00
7.4.190.0130.00619.08
7.4.180.0150.00419.11
7.4.160.0150.00318.96
7.4.150.0140.00718.98
7.4.140.0160.00718.89
7.4.130.0150.00618.08
7.4.120.0160.00418.41
7.4.110.0160.00418.40
7.4.100.0150.00618.51
7.4.90.0170.00418.42
7.4.80.0140.00719.00
7.4.70.0130.00718.32
7.4.60.0120.00718.35
7.4.50.0130.00718.35
7.4.40.0140.00518.49
7.4.30.0140.00818.44
7.4.20.0130.00718.38
7.4.10.0140.00518.40
7.4.00.0140.00518.41
7.3.330.0120.00618.21
7.3.320.0170.00718.65
7.3.310.0190.00619.64
7.3.300.0120.00718.92
7.3.290.0140.00718.29
7.3.280.0170.00518.83
7.3.270.0200.00418.84
7.3.260.0170.00618.36
7.3.250.0170.00418.75
7.3.240.0130.00717.58
7.3.230.0180.00518.32
7.3.220.0170.00818.75
7.3.210.0130.00718.30
7.3.200.0120.00718.31
7.3.190.0150.00718.26
7.3.180.0150.00718.34
7.3.170.0140.00718.36
7.3.160.0140.00918.29
7.3.150.0150.00618.21
7.3.140.0150.00718.27
7.3.130.0160.00518.26
7.3.120.0160.00418.19
7.3.110.0120.00818.30
7.3.100.0130.00718.12
7.3.90.0150.00518.43
7.3.80.0170.00518.28
7.3.70.0150.00618.54
7.3.60.0180.00418.40
7.3.50.0150.00518.37
7.3.40.0130.00718.37
7.3.30.0140.00618.29
7.3.20.0140.00718.44
7.3.10.0130.00618.35
7.3.00.0130.00718.35
7.2.340.0140.00718.94
7.2.330.0160.00718.39
7.2.320.0110.01118.49
7.2.310.0170.00518.37
7.2.300.0160.00518.35
7.2.290.0140.00718.47
7.2.280.0170.00618.37
7.2.270.0170.00518.33
7.2.260.0150.00618.40
7.2.250.0180.00618.35
7.2.240.0170.00718.51
7.2.230.0200.00518.40
7.2.220.0180.00618.37
7.2.210.0130.00718.35
7.2.200.0170.00518.51
7.2.190.0160.00518.46
7.2.180.0160.00418.47
7.2.170.0140.00818.58
7.2.160.0130.00918.45
7.2.150.0180.00518.57
7.2.140.0180.00718.61
7.2.130.0140.01018.66
7.2.120.0200.00718.50
7.2.110.0180.00818.62
7.2.100.0150.00618.58
7.2.90.0170.00618.55
7.2.80.0190.00518.63
7.2.70.0150.01018.58
7.2.60.0160.00918.51
7.2.50.0170.00718.54
7.2.40.0200.00518.54
7.2.30.0190.00518.53
7.2.20.0180.00618.60
7.2.10.0160.00418.66
7.2.00.0120.00718.64
5.0.00.0050.00716.07

preferences:
27.91 ms | 403 KiB | 5 Q