3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strs = [ 'Ostroměr', 'Šventaragis', 'Świętopełk', 'Dušan', 'Živko', ]; /** * Decodes a url-encoded path segment. */ function decodePathSegment(string $path): string { $path = rawurldecode($path); $encoding = mb_detect_encoding($path, ['UTF-8', 'ISO-8859-1']); switch ($encoding) { case 'ISO-8859-1': $path = utf8_encode($path); } return $path; } foreach($strs as $str) { var_dump( decodePathSegment($str)); }

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.90.0130.00516.91
8.5.80.0060.00917.74
8.5.70.0090.00716.80
8.5.60.0080.00718.53
8.5.50.0120.00716.76
8.5.30.0120.00520.19
8.5.20.0110.00820.07
8.5.10.0120.00618.41
8.5.00.0160.00519.64
8.4.240.0100.00919.68
8.4.230.0100.01119.63
8.4.220.0130.00719.47
8.4.210.0160.00521.25
8.4.180.0140.01019.63
8.4.170.0150.00723.82
8.4.160.0110.00623.65
8.4.150.0060.00617.78
8.4.140.0120.00817.39
8.4.130.0110.01018.10
8.4.120.0090.01020.61
8.4.110.0080.01022.48
8.4.100.0040.00719.27
8.4.90.0100.01118.59
8.4.80.0120.00919.52
8.4.70.0140.00517.81
8.4.60.0070.00218.81
8.4.50.0110.00819.68
8.4.40.0000.01017.88
8.4.30.0090.00620.65
8.4.20.0070.01117.88
8.4.10.0040.01221.84
8.3.320.0070.00718.56
8.3.310.0140.00718.57
8.3.300.0130.00720.79
8.3.290.0100.01020.80
8.3.280.0100.01418.23
8.3.270.0120.00816.81
8.3.260.0120.00816.45
8.3.250.0030.00518.85
8.3.240.0110.00816.22
8.3.230.0100.01016.80
8.3.220.0100.00817.25
8.3.210.0060.00916.56
8.3.200.0070.00216.41
8.3.190.0090.00516.97
8.3.180.0070.00516.57
8.3.170.0120.00317.30
8.3.160.0070.01116.49
8.3.150.0150.00420.77
8.3.140.0140.00416.42
8.3.130.0040.00418.51
8.3.120.0050.00318.93
8.3.110.0060.00320.94
8.3.100.0100.01016.49
8.3.90.0070.01126.77
8.3.80.0060.00316.50
8.3.70.0090.00616.58
8.3.60.0040.01118.18
8.3.50.0120.00320.04
8.3.40.0030.01218.84
8.3.30.0110.00319.09
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.320.0090.01218.09
8.2.310.0160.00620.05
8.2.300.0120.00818.86
8.2.290.0140.00520.12
8.2.280.0110.00820.23
8.2.270.0070.00717.32
8.2.260.0040.00818.41
8.2.250.0110.00418.48
8.2.240.0030.00517.23
8.2.230.0080.00022.58
8.2.220.0080.00024.06
8.2.210.0080.00026.77
8.2.200.0060.00316.50
8.2.190.0040.01117.13
8.2.180.0140.00625.92
8.2.170.0030.01219.20
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00326.16
8.2.110.0030.00722.23
8.2.100.0040.00718.03
8.2.90.0040.00417.75
8.2.80.0040.00419.04
8.2.70.0050.00317.75
8.2.60.0000.00917.88
8.2.50.0000.00817.98
8.2.40.0050.00318.34
8.2.30.0040.00418.17
8.2.20.0000.00820.62
8.2.10.0040.00418.20
8.2.00.0020.00519.50
8.1.340.0120.00721.69
8.1.330.0120.00721.96
8.1.320.0130.00616.45
8.1.310.0040.01116.75
8.1.300.0130.00718.06
8.1.290.0080.00030.84
8.1.280.0150.00025.92
8.1.270.0000.00823.99
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0030.00624.02
8.1.230.0120.00019.29
8.1.220.0000.00818.60
8.1.210.0080.00018.77
8.1.200.0040.00417.48
8.1.190.0080.00017.50
8.1.180.0000.00818.10
8.1.170.0080.00017.62
8.1.160.0040.00420.77
8.1.150.0000.00718.75
8.1.140.0050.00217.52
8.1.130.0070.00019.02
8.1.120.0000.00717.68
8.1.110.0060.00317.66
8.1.100.0050.00317.62
8.1.90.0020.00517.61
8.1.80.0060.00317.70
8.1.70.0070.00017.60
8.1.60.0000.00817.82
8.1.50.0180.00417.55
8.1.40.0190.00317.57
8.1.30.0180.00917.76
8.1.20.0210.00417.67
8.1.10.0150.00817.61
8.1.00.0080.00517.69
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0030.00518.49
8.0.270.0040.00416.95
8.0.260.0030.00318.52
8.0.250.0070.00017.12
8.0.240.0000.00717.13
8.0.230.0030.00317.10
8.0.220.0030.00317.01
8.0.210.0070.00017.06
8.0.200.0030.00317.09
8.0.190.0060.00316.99
8.0.180.0120.00417.01
8.0.170.0090.00917.00
8.0.160.0130.00716.90
8.0.150.0160.00316.92
8.0.140.0090.00916.95
8.0.130.0130.00716.94
8.0.120.0100.01016.93
8.0.110.0150.00416.91
8.0.100.0140.00716.97
8.0.90.0160.00417.03
8.0.80.0130.00016.89
8.0.70.0070.00716.66
8.0.60.0130.00417.09
8.0.50.0130.00516.98
8.0.30.0170.00416.96
8.0.20.0160.00516.96
8.0.10.0150.00417.07
7.4.330.0000.00515.55
7.4.320.0000.00616.72
7.4.300.0030.00316.62
7.4.290.0100.00716.77
7.4.280.0140.00016.71
7.4.270.0060.00616.71
7.4.260.0040.01116.49
7.4.250.0190.00616.61
7.4.240.0110.00416.61
7.4.230.0060.00816.73
7.4.220.0130.00416.52
7.4.210.0100.00716.59
7.4.200.0110.00416.50
7.4.190.0160.00316.68
7.4.180.0180.00316.59
7.4.160.0180.00016.76
7.4.150.0170.00016.63
7.4.140.0150.00316.64
7.4.130.0110.00716.38
7.4.120.0130.00516.62
7.4.110.0120.00616.53
7.4.100.0130.00516.65
7.4.90.0070.01016.71
7.4.80.0000.01316.60
7.4.70.0090.00316.19
7.4.60.0080.00416.29
7.4.50.0100.00016.24
7.4.40.0050.00516.13
7.4.30.0110.00016.36
7.4.20.0040.00816.34
7.4.10.0030.00616.46
7.4.00.0070.00616.64

preferences:
50.92 ms | 1308 KiB | 5 Q