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 function isEmail($value)

    {

        return filter_var($value, FILTER_VALIDATE_EMAIL) !== false;

    }
<?php     public static function isUrl($string)

    {

        return self::startsWith($string, '/') || filter_var($string, FILTER_VALIDATE_URL) !== false;

    }



    public static function deslugify($string)