Replace isset($url[0]) on strlen($url)