filter_var

Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Filters a variable with a specified filter
<?php filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed
<?php     public static function isUrl(string $value): bool

    {

        return (bool) filter_var($value, FILTER_VALIDATE_URL);

    }

}