protected function isExternalUrl(string $url): bool
    {
        return (!filter_var($url, FILTER_VALIDATE_URL) === false) && (strpos($url, 'vfs://') === false);
    }
protected function isExternalUrl(string $url): bool
    {
        return (!filter_var($url, FILTER_VALIDATE_URL) === false) && (strpos($url, 'vfs://') === false);
    }
protected function isExternalUrl ( string $ url ) : bool { return ( ! filter_var ( $ url , FILTER_VALIDATE_URL ) === false ) && ( strpos ( $ url , 'vfs://' ) === false ) ; }
Check if url is valid.

@param string $url

@return bool
Check if url is valid .