htmlspecialchars() or htmlentities() not working
<p>Here is my code</p>

<pre><code>$currentPage = SITE_URL.'/'.basename($_SERVER['PHP_SELF'])."?".substr($tail,1);
//For example a URL 'http://php.net/docs.php
'
$currentPage = htmlspecialchars($currentPage);
//$currentPage = htmlentities($currentPage);

//I was hoping for a output like this 'http%3A%2F%2Fphp.net%2Fdocs.php  '
echo $currentPage;  //but I get http://php.net/docs.php again
</code></pre>

<p>I get exactly the same output as the input</p>
