3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeQuestionMarks($URL){ if(preg_match('/^http(s)?:\/\/example\.com\/forum\/.*$/',$URL) === 1){ $URL = trim($URL); $URL = str_replace("?","",$URL); } return str_replace([' ', '&'],['%20', '&amp;'],$URL); } echo removeQuestionMarks('https://example.com/forum/post/work/22/what-are-requirements-to-get-a-work-permit?/24'),PHP_EOL; echo removeQuestionMarks('https://example.com/forum/ why? is it difficult?/877');

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.130.0120.00918.61
8.3.120.0130.00720.56
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0000.01126.77
8.3.80.0060.00318.55
8.3.70.0090.00916.48
8.3.60.0000.01518.56
8.3.50.0100.00618.23
8.3.40.0140.00018.98
8.3.30.0170.00718.96
8.3.20.0050.00320.85
8.3.10.0040.00423.48
8.3.00.0050.00320.95
8.2.250.0060.00316.83
8.2.240.0170.00317.51
8.2.230.0070.00422.58
8.2.220.0040.00437.54
8.2.210.0080.00026.77
8.2.200.0060.00318.66
8.2.190.0200.00018.29
8.2.180.0150.00318.66
8.2.170.0070.00722.96
8.2.160.0070.00720.38
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00319.66
8.2.110.0040.00419.21
8.2.100.0030.01017.91
8.2.90.0040.00420.42
8.2.80.0030.00517.97
8.2.70.0030.00518.03
8.2.60.0030.00618.22
8.2.50.0030.00518.10
8.2.40.0030.00519.52
8.2.30.0040.00419.14
8.2.20.0000.00718.09
8.2.10.0040.00419.28
8.2.00.0030.00318.21
8.1.300.0090.00018.05
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0040.00420.36
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00023.78
8.1.230.0080.00421.04
8.1.220.0060.00317.74
8.1.210.0040.00419.15
8.1.200.0000.00817.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0060.00318.66
8.1.160.0070.00018.85
8.1.150.0040.00418.86
8.1.140.0040.00418.92
8.1.130.0000.00720.30
8.1.120.0080.00017.54
8.1.110.0040.00417.55
8.1.100.0040.00417.55
8.1.90.0040.00817.51
8.1.80.0070.00317.44
8.1.70.0000.00817.50
8.1.60.0040.00417.78
8.1.50.0000.00817.64
8.1.40.0000.00817.73
8.1.30.0040.00417.80
8.1.20.0040.00417.75
8.1.10.0000.00717.60
8.1.00.0000.00817.45
8.0.300.0050.00219.98
8.0.290.0040.00416.88
8.0.280.0040.00418.42
8.0.270.0040.00416.89
8.0.260.0030.00318.51
8.0.250.0030.00317.11
8.0.240.0000.00717.02
8.0.230.0070.00017.07
8.0.220.0000.00817.00
8.0.210.0020.00516.99
8.0.200.0000.00717.01
8.0.190.0030.00617.03
8.0.180.0080.00016.87
8.0.170.0030.00716.89
8.0.160.0040.00417.05
8.0.150.0030.00316.91
8.0.140.0000.00716.86
8.0.130.0050.00013.37
8.0.120.0080.00016.90
8.0.110.0000.00816.97
8.0.100.0030.00517.09
8.0.90.0000.00717.01
8.0.80.0090.00716.98
8.0.70.0070.00316.92
8.0.60.0000.00817.02
8.0.50.0050.00316.80
8.0.30.0120.00717.28
8.0.20.0130.00617.29
8.0.10.0000.00717.16
8.0.00.0110.00816.91
7.4.330.0000.00516.71
7.4.320.0060.00016.81
7.4.300.0030.00616.73
7.4.290.0000.00716.73
7.4.280.0000.00716.73
7.4.270.0030.00316.62
7.4.260.0060.00316.70
7.4.250.0040.00416.70
7.4.240.0070.00016.81
7.4.230.0000.00716.92
7.4.220.0040.00416.78
7.4.210.0090.00916.75
7.4.200.0000.00816.62
7.4.160.0090.00816.72
7.4.140.0110.00617.86
7.4.130.0100.01016.67
7.4.120.0120.00916.71
7.4.110.0060.01116.59
7.4.100.0030.02016.77
7.4.90.0060.01216.48
7.4.80.0060.01219.39
7.4.70.0340.02716.70
7.4.60.0030.01316.70
7.4.50.0090.00916.57
7.4.40.0140.00316.65
7.4.00.0070.01115.04
7.3.330.0050.00013.23
7.3.320.0060.00013.36
7.3.310.0030.00316.36
7.3.300.0070.00016.41
7.3.290.0040.00416.24
7.3.280.0070.00916.39
7.3.260.0100.00916.59
7.3.240.0130.00616.55
7.3.230.0150.00316.46
7.3.210.0110.00516.88
7.3.200.0140.00316.54
7.3.190.0040.01216.82
7.3.180.0100.01016.59
7.3.170.0070.01016.64
7.3.160.0090.00916.45
7.3.40.0130.00914.93
7.3.30.0040.00814.99
7.3.20.0130.00016.84
7.3.10.0070.00716.50
7.3.00.0170.00416.84
7.2.330.0090.00916.91
7.2.320.0100.01316.76
7.2.310.0130.00316.84
7.2.300.0050.01116.65
7.2.290.0100.01316.99
7.2.170.0130.00615.35
7.2.160.0130.00715.02
7.2.150.0070.00717.02
7.2.140.0120.00017.14
7.2.130.0100.00717.25
7.2.120.0090.01416.75
7.2.110.0150.00316.84
7.2.100.0060.00616.90
7.2.90.0060.00817.14
7.2.80.0140.00017.29
7.2.70.0120.00316.87
7.2.60.0130.00816.94
7.2.50.0080.00317.06
7.2.40.0060.00617.07
7.2.30.0000.01216.91
7.2.20.0090.00616.82
7.2.10.0120.01217.16
7.2.00.0130.00017.12
7.1.280.0000.01115.90
7.1.270.0100.00315.78
7.1.260.0090.00616.00
7.1.250.0070.01315.68

preferences:
28.02 ms | 403 KiB | 5 Q