3v4l.org

run code in 300+ PHP versions simultaneously
<?php function urlRawDecode($raw_url_encoded) { # Hex conversion table $hex_table = array( 0 => 0x00, 1 => 0x01, 2 => 0x02, 3 => 0x03, 4 => 0x04, 5 => 0x05, 6 => 0x06, 7 => 0x07, 8 => 0x08, 9 => 0x09, "A"=> 0x0a, "B"=> 0x0b, "C"=> 0x0c, "D"=> 0x0d, "E"=> 0x0e, "F"=> 0x0f ); # Fixin' latin character problem if(preg_match_all("/\%C3\%([A-Z0-9]{2})/i", $raw_url_encoded,$res)) { $res = array_unique($res = $res[1]); $arr_unicoded = array(); foreach($res as $key => $value){ $arr_unicoded[] = chr( (0xc0 | ($hex_table[substr($value,0,1)]<<4)) | (0x03 & $hex_table[substr($value,1,1)]) ); $res[$key] = "%C3%" . $value; } $raw_url_encoded = str_replace( $res, $arr_unicoded, $raw_url_encoded ); } # Return decoded raw url encoded data return rawurldecode($raw_url_encoded); } print urlRawDecode("%C3%A1%C3%B1"); // output: // áñ ?>

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.0070.01016.73
8.3.50.0070.01117.57
8.3.40.0140.00318.92
8.3.30.0140.00319.00
8.3.20.0100.01018.98
8.3.10.0060.00318.91
8.3.00.0000.01119.63
8.2.180.0120.00916.63
8.2.170.0120.00622.96
8.2.160.0070.00719.01
8.2.150.0050.00524.18
8.2.140.0170.00324.66
8.2.130.0110.00426.16
8.2.120.0040.00420.68
8.2.110.0070.00422.37
8.2.100.0060.00618.16
8.2.90.0040.00418.05
8.2.80.0090.00019.15
8.2.70.0080.00017.88
8.2.60.0040.00417.88
8.2.50.0000.00818.05
8.2.40.0040.00420.07
8.2.30.0040.00417.84
8.2.20.0000.01017.85
8.2.10.0080.00017.95
8.2.00.0030.00617.89
8.1.280.0070.01025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00022.16
8.1.230.0080.00320.96
8.1.220.0000.00817.76
8.1.210.0030.00518.97
8.1.200.0040.00417.48
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0020.00519.05
8.1.150.0040.00418.80
8.1.140.0040.00417.58
8.1.130.0000.00717.86
8.1.120.0000.00717.63
8.1.110.0000.00717.66
8.1.100.0040.00417.61
8.1.90.0070.00017.64
8.1.80.0000.00717.52
8.1.70.0000.00717.50
8.1.60.0040.00417.74
8.1.50.0050.00317.64
8.1.40.0050.00317.54
8.1.30.0000.00917.64
8.1.20.0080.00417.80
8.1.10.0040.00417.74
8.1.00.0050.00317.68
8.0.300.0050.00220.13
8.0.290.0080.00016.88
8.0.280.0000.00718.56
8.0.270.0000.00717.20
8.0.260.0000.00616.88
8.0.250.0030.00617.17
8.0.240.0040.00417.01
8.0.230.0030.00317.03
8.0.220.0030.00317.05
8.0.210.0070.00017.02
8.0.200.0000.00717.00
8.0.190.0080.00317.11
8.0.180.0000.00716.96
8.0.170.0060.00316.93
8.0.160.0000.00717.12
8.0.150.0000.00917.00
8.0.140.0040.00416.93
8.0.130.0030.00313.47
8.0.120.0070.00317.04
8.0.110.0000.00716.94
8.0.100.0070.00016.92
8.0.90.0000.00717.08
8.0.80.0170.00417.08
8.0.70.0040.00416.94
8.0.60.0050.00316.98
8.0.50.0040.00416.93
8.0.30.0040.01116.95
8.0.20.0150.00717.47
8.0.10.0040.00417.12
8.0.00.0070.01416.92
7.4.330.0000.00513.13
7.4.320.0000.00616.81
7.4.300.0000.00616.72
7.4.290.0070.00016.67
7.4.280.0000.00716.71
7.4.270.0040.00416.82
7.4.260.0060.00013.50
7.4.250.0040.00416.78
7.4.240.0030.00316.68
7.4.230.0030.00316.82
7.4.220.0090.00916.59
7.4.210.0070.01016.81
7.4.200.0000.00716.54
7.4.190.0030.00316.79
7.4.160.0040.01116.75
7.4.150.0180.00016.60
7.4.140.0150.00916.88
7.4.130.0030.01316.62
7.4.120.0130.00916.79
7.4.110.0150.00316.88
7.4.100.0170.00016.86
7.4.90.0030.01416.63
7.4.80.0120.00819.39
7.4.70.0060.00916.58
7.4.60.0100.00716.66
7.4.50.0020.00216.30
7.4.40.0120.00316.85
7.4.30.0080.01116.69
7.4.00.0040.01115.25
7.3.330.0060.00013.35
7.3.320.0030.00313.40
7.3.310.0040.00416.54
7.3.300.0040.00416.53
7.3.290.0060.00916.49
7.3.280.0080.01116.48
7.3.270.0060.01616.80
7.3.260.0150.00616.57
7.3.250.0150.00516.69
7.3.240.0100.00716.88
7.3.230.0100.00716.70
7.3.210.0060.01216.71
7.3.200.0180.00316.50
7.3.190.0110.00716.73
7.3.180.0100.01016.63
7.3.170.0090.00916.54
7.3.160.0140.00316.60
7.3.120.0120.00615.05
7.2.330.0070.01016.87
7.2.320.0100.00717.04
7.2.310.0090.00916.91
7.2.300.0120.00416.91
7.2.290.0070.01016.87
7.1.100.0030.00918.18
7.1.70.0060.00317.37
7.1.60.0100.00719.30
7.1.50.0040.01417.02
7.1.00.0070.07322.32
7.0.200.0040.00716.90
7.0.140.0100.06722.10
7.0.120.0070.06322.25
7.0.60.0030.06721.72
7.0.50.0070.03717.92
7.0.40.4170.04720.15
7.0.30.3270.04320.09
7.0.20.3400.04320.07
7.0.10.3770.04320.18
7.0.00.3600.04020.16
5.6.280.0130.06321.16
5.6.210.0100.08020.56
5.6.200.0070.05018.18
5.6.190.3900.04720.61
5.6.180.3370.03720.54
5.6.170.3870.04020.58
5.6.160.3700.03320.61
5.6.150.3630.04720.38
5.6.140.3570.04020.38
5.6.130.3370.03720.39
5.6.120.1370.06720.37
5.6.110.0070.09020.54
5.6.100.4370.04020.32
5.6.90.4270.04020.33
5.6.80.4000.04319.70
5.6.70.3500.04019.63
5.6.60.4170.05019.65
5.6.50.4230.04319.74
5.6.40.4230.04019.67
5.6.30.3930.04319.65
5.6.20.3700.03719.71
5.6.10.3500.03719.92
5.6.00.3300.04019.66
5.5.350.0100.09320.39
5.5.340.0130.06017.99
5.5.330.1500.06720.37
5.5.320.3670.03320.27
5.5.310.3300.03720.19
5.5.300.3370.04020.07
5.5.290.3570.04320.16
5.5.280.0030.08720.16
5.5.270.0000.09020.08
5.5.260.4330.04020.14
5.5.250.3700.04319.98
5.5.240.3530.04019.50
5.5.230.3600.04319.44
5.5.220.3600.03719.53
5.5.210.5130.05019.71
5.5.200.4270.03719.68
5.5.190.4230.04319.50
5.5.180.4200.03719.43
5.5.160.3370.04319.48
5.5.150.3330.04019.44
5.5.140.3270.04319.50
5.5.130.3330.04019.42
5.5.120.3330.04319.50
5.5.110.3270.04019.41
5.5.100.3300.04019.59
5.5.90.3330.03719.40
5.5.80.3430.04019.40
5.5.70.3500.04319.39
5.5.60.3570.03319.39
5.5.50.3530.04719.32
5.5.40.3330.03019.42
5.5.30.3270.03319.37
5.5.20.3330.03719.32
5.5.10.3570.03719.38
5.5.00.3600.03719.40
5.4.450.3530.03319.32
5.4.440.0000.05019.60
5.4.430.1430.04319.21
5.4.420.3870.04019.23
5.4.410.4130.03719.20
5.4.400.3670.03319.02
5.4.390.3570.03318.96
5.4.380.4070.03318.98
5.4.370.3670.03319.09
5.4.360.4670.05019.01
5.4.350.4470.03018.95
5.4.340.3870.03719.03
5.4.320.3630.03719.04
5.4.310.3330.03319.12
5.4.300.3330.03319.13
5.4.290.3270.04319.05
5.4.280.3400.03318.96
5.4.270.3300.03719.02
5.4.260.3330.03319.09
5.4.250.3370.03319.03
5.4.240.3270.03719.09
5.4.230.3800.03719.09
5.4.220.3470.03719.13
5.4.210.3330.03719.01
5.4.200.3330.03318.95
5.4.190.3400.03318.88
5.4.180.3200.04018.88
5.4.170.3570.03018.96
5.4.160.0070.07318.97
5.4.150.0030.04019.00
5.4.140.3800.03716.31
5.4.130.3570.03016.39
5.4.120.3470.03716.42
5.4.110.3700.04016.48
5.4.100.3770.04016.45
5.4.90.3670.03316.43
5.4.80.3830.03016.39
5.4.70.3300.03716.57
5.4.60.3600.04016.38
5.4.50.3370.03716.45
5.4.40.4170.03316.38
5.4.30.4270.03316.21
5.4.20.4770.03716.27
5.4.10.4170.04016.35
5.4.00.3570.03715.75
5.3.290.3500.05014.72
5.3.280.3400.04014.60
5.3.270.3530.04014.67
5.3.260.0030.05014.67
5.3.250.2470.04014.66
5.3.240.3800.04014.83
5.3.230.3400.04014.66
5.3.220.3600.03314.68
5.3.210.3570.03014.60
5.3.200.3500.03014.65
5.3.190.3830.03314.62
5.3.180.3700.04314.63
5.3.170.3770.03714.43
5.3.160.3770.04314.68
5.3.150.3570.03714.64
5.3.140.4170.03314.63
5.3.130.4130.03714.52
5.3.120.3670.04014.61
5.3.110.3700.04314.58
5.3.100.3470.04014.00
5.3.90.3500.04014.05
5.3.80.3600.04013.92
5.3.70.2870.03714.08
5.3.60.3630.03013.86
5.3.50.3600.04713.97
5.3.40.3870.03713.96
5.3.30.4000.03713.95
5.3.20.0070.07313.92
5.3.10.1330.04013.78
5.3.00.3770.04313.73
5.2.170.3330.02711.05
5.2.160.2830.02711.13
5.2.150.3400.03311.37
5.2.140.2430.03011.21
5.2.130.0170.04711.21
5.2.120.0070.04011.21
5.2.110.3270.02711.13
5.2.100.3830.02711.18
5.2.90.3630.02711.33
5.2.80.3530.03011.18
5.2.70.3430.03011.16
5.2.60.3370.02711.28
5.2.50.2770.02311.03
5.2.40.2330.03011.09
5.2.30.2300.03010.95
5.2.20.2300.03011.05
5.2.10.2430.03310.92
5.2.00.2800.02310.78
5.1.60.2470.02710.05
5.1.50.2430.02310.00
5.1.40.2070.0309.96
5.1.30.2400.03010.35
5.1.20.2200.02010.33
5.1.10.2400.03010.13
5.1.00.2400.02310.02
5.0.50.1170.0208.57
5.0.40.1200.0238.42
5.0.30.1230.0378.31
5.0.20.1370.0208.29
5.0.10.1300.0178.11
5.0.00.1330.0338.23
4.4.90.1730.0205.87
4.4.80.1200.0105.84
4.4.70.1070.0175.88
4.4.60.1070.0175.87
4.4.50.1370.0175.92
4.4.40.1330.0275.85
4.4.30.1330.0175.84
4.4.20.1370.0205.90
4.4.10.1370.0175.89
4.4.00.1370.0305.93
4.3.110.1330.0175.86
4.3.100.1330.0105.76
4.3.90.1270.0175.74
4.3.80.1070.0235.71
4.3.70.1430.0135.74
4.3.60.1700.0135.74
4.3.50.1130.0135.81
4.3.40.1100.0275.78
4.3.30.0800.0235.40
4.3.20.0770.0175.40
4.3.10.1000.0205.40
4.3.00.0870.0175.40

preferences:
50.68 ms | 401 KiB | 5 Q