How do I tell PHP 7.1.3 that when I use filter_var to validate a URL, that the scheme is NOT required? just saying www.google.com for example is a completely valid URL, but filter_var will return false for that. I see that I can add flags, but not how to remove them.
<?php
$url = 'www.google.com';
$sanitized = filter_var($url, FILTER_SANITIZE_URL);
$valid = filter_var($sanitized, FILTER_VALIDATE_URL);
if ($valid) {
echo "Yes
";
} else {
echo "'$sanitized' is not valid
";
}