"Return of a Function() in PHP" skip syntex error in filter_var()
private function getURL(){ $url = isset($_GET['url']) && $_GET['url'] != "" ? $_GET['url'] : "home"; return explode("/", filter_var(trim($url,"/")),FILTER_SANITIZE_URL); } The above code execute without any warning or error, but the second line of getURL() function should be like: return explode("/", filter_var(trim($url,"/"),FILTER_SANITIZE_URL));…