3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "This string contains some unwanted characters on the end."; $text1 = rtrim($text, 'a..z'); $text1 = rtrim($text1, '.'); echo $text1; // only the '.' is trimmed. $text2 = rtrim($text, 'a..z.'); echo $text2; // The whole last word is trimmed.

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.3.60.0120.00316.63
8.3.50.0160.00317.36
8.3.40.0120.00318.86
8.3.30.0030.01018.68
8.3.20.0080.00018.57
8.3.10.0060.00320.57
8.3.00.0090.00317.38
8.2.180.0160.00616.50
8.2.170.0130.00722.96
8.2.160.0140.00021.14
8.2.150.0000.00924.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0000.00719.83
8.2.110.0030.00619.36
8.2.100.0000.01217.72
8.2.90.0060.00319.30
8.2.80.0040.00419.39
8.2.70.0030.00517.63
8.2.60.0080.00018.04
8.2.50.0030.00518.07
8.2.40.0030.00618.16
8.2.30.0040.00417.98
8.2.20.0040.00417.65
8.2.10.0080.00017.79
8.2.00.0050.00317.73
8.1.280.0040.01125.92
8.1.270.0080.00024.66
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0040.00723.77
8.1.230.0070.00422.69
8.1.220.0040.00417.79
8.1.210.0030.00618.95
8.1.200.0000.00817.13
8.1.190.0100.00317.53
8.1.180.0110.00218.10
8.1.170.0080.00018.71
8.1.160.0000.00718.82
8.1.150.0030.00518.54
8.1.140.0030.00617.39
8.1.130.0030.00317.69
8.1.120.0040.00417.35
8.1.110.0040.00417.44
8.1.100.0060.00317.40
8.1.90.0030.00317.30
8.1.80.0000.00717.27
8.1.70.0030.00317.33
8.1.60.0000.01017.53
8.1.50.0060.00317.40
8.1.40.0030.00617.41
8.1.30.0040.00417.56
8.1.20.0000.00817.63
8.1.10.0000.00717.50
8.1.00.0050.00217.45
8.0.300.0080.00020.02
8.0.290.0000.00816.75
8.0.280.0000.00718.45
8.0.270.0030.00317.15
8.0.260.0000.00616.84
8.0.250.0080.00016.86
8.0.240.0040.00416.91
8.0.230.0030.00316.89
8.0.220.0050.00316.80
8.0.210.0020.00516.83
8.0.200.0000.00716.88
8.0.190.0040.00416.88
8.0.180.0000.00816.75
8.0.170.0000.00816.77
8.0.160.0040.00416.88
8.0.150.0050.00316.66
8.0.140.0090.00016.82
8.0.130.0030.00313.31
8.0.120.0050.00316.67
8.0.110.0040.00416.85
8.0.100.0040.00416.68
8.0.90.0040.00416.70
8.0.80.0070.00716.77
8.0.70.0000.00816.85
8.0.60.0000.00816.63
8.0.50.0080.00016.68
8.0.30.0160.00516.99
8.0.20.0120.00716.89
8.0.10.0040.00416.95
8.0.00.0070.01016.55
7.4.330.0030.00212.84
7.4.320.0000.00616.39
7.4.300.0000.00716.45
7.4.290.0090.00016.57
7.4.280.0050.00316.44
7.4.270.0030.00316.58
7.4.260.0000.00513.21
7.4.250.0040.00416.45
7.4.240.0030.00316.55
7.4.230.0030.00316.64
7.4.220.0110.00716.56
7.4.210.0080.00916.52
7.4.200.0070.00016.62
7.4.190.0000.00716.61
7.4.160.0060.01016.44
7.4.150.0070.01116.33
7.4.140.0100.00816.38
7.4.130.0100.00816.49
7.4.120.0110.00616.45
7.4.110.0100.00616.33
7.4.100.0100.00716.60
7.4.90.0100.00716.35
7.4.80.0100.00616.10
7.4.70.0060.00916.43
7.4.60.0030.01616.50
7.4.50.0040.00416.55
7.4.40.0070.00716.56
7.4.30.0060.00916.39
7.4.10.0070.01014.86
7.4.00.0100.00814.83
7.3.330.0040.00312.93
7.3.320.0030.00313.05
7.3.310.0080.00016.13
7.3.300.0000.00716.04
7.3.290.0110.00416.16
7.3.280.0070.00716.21
7.3.270.0090.00816.21
7.3.260.0120.00916.39
7.3.250.0090.00916.34
7.3.240.0120.00616.55
7.3.230.0110.00616.36
7.3.210.0160.00016.23
7.3.200.0130.01019.39
7.3.190.0070.01016.12
7.3.180.0070.00716.20
7.3.170.0050.01116.38
7.3.160.0040.01116.26
7.3.130.0030.01314.69
7.3.120.0050.01014.63
7.3.110.0060.01314.59
7.3.100.0060.00914.30
7.3.90.0060.00914.76
7.3.80.0000.00914.60
7.3.70.0030.01214.44
7.3.60.0080.00814.70
7.3.50.0040.00814.54
7.3.40.0060.00614.37
7.3.30.0060.00614.57
7.3.20.0070.00716.52
7.3.10.0060.00816.71
7.3.00.0100.00416.59
7.2.330.0110.01316.65
7.2.320.0100.01016.31
7.2.310.0120.00416.37
7.2.300.0130.01016.57
7.2.290.0140.00616.60
7.2.260.0070.01314.68
7.2.250.0100.00314.70
7.2.240.0070.00715.05
7.2.230.0090.00614.95
7.2.220.0070.00714.82
7.2.210.0080.00414.76
7.2.200.0100.00715.02
7.2.190.0000.01214.80
7.2.180.0100.00714.59
7.2.170.0070.00714.36
7.2.160.0050.00514.66
7.2.150.0030.00916.71
7.2.140.0100.00316.70
7.2.130.0060.00816.62
7.2.120.0050.00716.81
7.2.110.0050.00916.72
7.2.100.0070.00916.86
7.2.90.0030.01016.61
7.2.80.0080.00516.43
7.2.70.0090.00516.71
7.2.60.0050.01216.72
7.2.50.0060.01116.78
7.2.40.0030.00916.81
7.2.30.0080.00516.85
7.2.20.0070.00716.79
7.2.10.0100.00316.64
7.2.00.0110.00717.74
7.1.330.0040.01115.78
7.1.320.0090.00015.58
7.1.310.0030.01015.97
7.1.300.0040.01115.59
7.1.290.0030.01015.73
7.1.280.0000.01515.43
7.1.270.0030.01015.50
7.1.260.0060.00915.62
7.1.250.0060.00515.46
7.1.240.0070.00715.71
7.1.230.0030.01015.71
7.1.220.0080.00615.51
7.1.210.0060.01015.56
7.1.200.0040.00415.62
7.1.190.0000.01415.45
7.1.180.0060.00915.57
7.1.170.0000.00915.59
7.1.160.0040.00415.41
7.1.150.0070.00715.86
7.1.140.0090.00615.52
7.1.130.0130.00015.34
7.1.120.0060.00915.53
7.1.110.0030.00615.90
7.1.100.0000.01316.98
7.1.90.0070.00315.60
7.1.80.0040.01115.50
7.1.70.0020.00716.44
7.1.60.0080.01117.51
7.1.50.0070.01116.13
7.1.40.0060.00615.42
7.1.30.0140.00415.73
7.1.20.0000.01415.40
7.1.10.0070.00315.69
7.1.00.0080.03519.05
7.0.330.0050.00815.32
7.0.320.0000.00815.30
7.0.310.0060.00315.30
7.0.300.0030.00715.08
7.0.290.0000.01215.06
7.0.280.0100.00315.18
7.0.270.0100.00015.22
7.0.260.0000.01515.05
7.0.250.0050.00315.07
7.0.240.0070.00715.37
7.0.230.0060.00615.13
7.0.220.0030.01315.28
7.0.210.0030.01215.38
7.0.200.0030.00815.90
7.0.190.0060.01015.36
7.0.180.0060.00915.38
7.0.170.0070.00415.32
7.0.160.0070.01015.35
7.0.150.0030.00615.24
7.0.140.0050.04018.67
7.0.130.0040.01015.26
7.0.120.0050.04118.55
7.0.110.0060.00315.13
7.0.100.0090.00015.32
7.0.90.0090.00615.23
7.0.80.0040.01015.12
7.0.70.0110.00715.46
7.0.60.0070.02717.50
7.0.50.0070.03216.66
7.0.40.0050.04515.60
7.0.30.0050.04015.57
7.0.20.0070.04715.64
7.0.10.0050.03715.63
7.0.00.0040.02715.48
5.6.400.0000.01514.49
5.6.390.0040.00813.87
5.6.380.0040.00714.03
5.6.370.0000.01214.36
5.6.360.0030.00613.96
5.6.350.0090.00613.91
5.6.340.0030.01014.34
5.6.330.0000.00914.35
5.6.320.0130.00014.22
5.6.310.0150.00013.99
5.6.300.0040.00814.00
5.6.290.0060.01014.18
5.6.280.0030.04517.52
5.6.270.0000.00914.22
5.6.260.0070.00314.00
5.6.250.0100.00714.33
5.6.240.0060.00314.20
5.6.230.0110.00013.92
5.6.220.0070.01114.24
5.6.210.0060.02117.35
5.6.200.0050.04515.99
5.6.190.0030.04016.00
5.6.180.0090.03916.22
5.6.170.0150.01816.21
5.6.160.0020.02616.18
5.6.150.0050.02516.14
5.6.140.0080.02316.13
5.6.130.0100.02116.20
5.6.120.0070.04416.17
5.6.110.0030.04516.16
5.6.100.0050.05016.12
5.6.90.0050.04316.12
5.6.80.0050.02815.85
5.6.70.0050.03015.85
5.6.60.0050.04415.74
5.6.50.0050.04315.79
5.6.40.0050.04015.86
5.6.30.0090.03315.67
5.6.20.0050.03715.75
5.6.10.0030.04415.76
5.6.00.0050.04415.86
5.5.380.0030.01014.00
5.5.370.0100.00614.45
5.5.360.0170.00014.02
5.5.350.0180.04017.16
5.5.340.0070.04215.89
5.5.330.0130.03816.01
5.5.320.0150.03515.82
5.5.310.0120.03515.96
5.5.300.0070.02416.18
5.5.290.0060.04516.18
5.5.280.0100.04115.97
5.5.270.0030.03015.99
5.5.260.0080.02715.93
5.5.250.0020.02615.83
5.5.240.0050.03815.86
5.5.230.0030.02515.63
5.5.220.0070.02015.73
5.5.210.0060.02015.61
5.5.200.0070.03015.46
5.5.190.0050.03215.73
5.5.180.0090.03715.57
5.5.170.0030.01014.20
5.5.160.0100.03215.76
5.5.150.0100.03215.77
5.5.140.0050.03415.76
5.5.130.0050.03215.62
5.5.120.0050.03515.77
5.5.110.0090.04015.72
5.5.100.0070.04615.65
5.5.90.0050.02915.65
5.5.80.0080.04015.77
5.5.70.0040.03915.62
5.5.60.0020.03015.69
5.5.50.0080.02915.50
5.5.40.0090.03315.54
5.5.30.0030.03515.63
5.5.20.0080.03415.61
5.5.10.0100.04215.51
5.5.00.0050.04215.54
5.4.450.0070.04115.05
5.4.440.0060.02515.17
5.4.430.0080.02315.13
5.4.420.0050.03015.14
5.4.410.0050.03715.04
5.4.400.0090.03815.01
5.4.390.0030.04014.88
5.4.380.0070.04214.78
5.4.370.0070.03514.98
5.4.360.0050.04514.87
5.4.350.0030.02514.84
5.4.340.0030.04314.96
5.4.330.0040.00410.83
5.4.320.0050.04014.99
5.4.310.0090.03814.89
5.4.300.0070.04214.83
5.4.290.0020.04214.97
5.4.280.0060.03014.91
5.4.270.0090.02815.03
5.4.260.0080.03814.89
5.4.250.0070.03514.87
5.4.240.0080.02814.99
5.4.230.0070.04314.78
5.4.220.0040.02314.93
5.4.210.0100.03714.83
5.4.200.0110.03714.88
5.4.190.0030.04414.83
5.4.180.0090.03615.01
5.4.170.0050.03314.71
5.4.160.0070.03414.95
5.4.150.0070.03115.01
5.4.140.0080.02713.42
5.4.130.0090.03513.53
5.4.120.0050.03213.59
5.4.110.0060.03613.63
5.4.100.0030.03313.68
5.4.90.0070.02413.65
5.4.80.0020.04913.53
5.4.70.0030.04313.58
5.4.60.0050.03913.59
5.4.50.0080.01713.54
5.4.40.0030.01813.73
5.4.30.0020.02113.49
5.4.20.0070.01813.53
5.4.10.0070.01713.46
5.4.00.0060.01813.30
5.3.290.0100.03912.56
5.3.280.0100.01812.52
5.3.270.0020.04212.46
5.3.260.0070.04012.35
5.3.250.0040.04212.39
5.3.240.0050.03912.43
5.3.230.0050.04312.46
5.3.220.0080.02812.39
5.3.210.0050.04512.37
5.3.200.0030.03712.37
5.3.190.0030.02512.32
5.3.180.0020.02612.44
5.3.170.0060.03012.47
5.3.160.0060.03912.47
5.3.150.0080.03712.49
5.3.140.0020.02112.35
5.3.130.0060.02612.34
5.3.120.0060.02312.41
5.3.110.0020.02312.47
5.3.100.0060.01912.16
5.3.90.0020.02012.13
5.3.80.0020.02312.08
5.3.70.0020.02012.07
5.3.60.0010.02312.15
5.3.50.0030.01812.05
5.3.40.0050.02012.08
5.3.30.0050.03812.08
5.3.20.0030.02011.95
5.3.10.0030.02211.93
5.3.00.0000.02211.77
5.2.170.0030.02711.12
5.2.160.0070.03710.98
5.2.150.0030.05011.15
5.2.140.0030.04311.06
5.2.130.0100.03311.00
5.2.120.0030.03011.09
5.2.110.0030.02711.06
5.2.100.0030.02711.09
5.2.90.0030.02711.06
5.2.80.0000.03011.02
5.2.70.0030.03011.06
5.2.60.0000.03010.88
5.2.50.0030.02710.94
5.2.40.0030.02710.91
5.2.30.0000.03010.80
5.2.20.0000.03010.95
5.2.10.0030.02710.87
5.2.00.0030.02710.71
5.1.60.0070.0209.98
5.1.50.0030.0239.93
5.1.40.0000.02310.02
5.1.30.0000.02710.17
5.1.20.0000.02710.29
5.1.10.0070.02010.05
5.1.00.0000.02710.05
5.0.50.0000.0208.57
5.0.40.0000.0208.57
5.0.30.0070.0278.57
5.0.20.0030.0178.57
5.0.10.0000.0208.57
5.0.00.0000.0308.57
4.4.90.0000.0178.57
4.4.80.0030.0138.57
4.4.70.0000.0178.57
4.4.60.0000.0178.57
4.4.50.0000.0138.57
4.4.40.0030.0208.57
4.4.30.0000.0178.57
4.4.20.0000.0178.57
4.4.10.0070.0108.57
4.4.00.0000.0238.57
4.3.110.0030.0108.57
4.3.100.0000.0138.57
4.3.90.0000.0138.57
4.3.80.0000.0278.57
4.3.70.0000.0138.57
4.3.60.0000.0138.57
4.3.50.0030.0178.57
4.3.40.0000.0238.57
4.3.30.0000.0138.57
4.3.20.0000.0178.57
4.3.10.0000.0138.57
4.3.00.0000.0138.57

preferences:
36.57 ms | 401 KiB | 5 Q