rawurldecode
Description
The rawurldecode of URL for PHP decodes a URL string according to RFC 3986.
Syntax
rawurldecode(
string $string
): stringParameters
string
The URL to be decoded.
Return
Returns the decoded URL as a string.
Examples
1 · not replaced
<? $string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz". "-_.". "~"; $return = rawurldecode($string); echo $return;
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.~
2 · replaced
<? $string = "%60%21%40%23%24%25%5E%26%2A%28%29%2B%3D%7B%5B%7D%5D%7C%5C%3A%3B%22%27%3C%2C%3E%3F%2F". "%20"; $return = rawurldecode($string); echo $return;
`!@#$%^&*()+={[}]|\:;"'<,>?/ 3 · url
<? $string = "url%20to%20be%20decoded"; $return = rawurldecode($string); echo '<a href="https://osbo.com?arg=' . $string . '">' . $return . '</a>';
<a href="https://osbo.com?arg=url%20to%20be%20decoded">url to be decoded</a>