public function validateUrl($url)
    {
        foreach ($this->validUrlStartChars as $char) {
            if (0 === strpos($url, $char)) {
                return true;
            }
        }

        return false !== filter_var($url, FILTER_VALIDATE_URL);
    }
public function validateUrl($url)
    {
        foreach ($this->validUrlStartChars as $char) {
            if (0 === strpos($url, $char)) {
                return true;
            }
        }

        return false !== filter_var($url, FILTER_VALIDATE_URL);
    }
public function validateUrl ( $ url ) { foreach ( $ this -> validUrlStartChars as $ char ) { if ( 0 === strpos ( $ url , $ char ) ) { return true ; } } return false !== filter_var ( $ url , FILTER_VALIDATE_URL ) ; }
Determine if the given path is a valid URL.

@param $url
@return bool
Determine if the given path is a valid URL .