I am running the following code in PHP. My intention is to get "contact.html" in the response, but what I actually get in the output is ntact.html
$str = 'http://localhost/contact.html';
echo $str . "<br>";
echo ltrim($str,'http://localhost');
Any thoughts why PHP is behaving this way and what can I do to fix this?