public function isValid(string $var, bool $strict = true): bool
    {
        return (bool) preg_match($strict ? $this::VAR_STRICT_REGEX_VALID : $this::VAR_REGEX_VALID, $var);
    }
public function isValid(string $var, bool $strict = true): bool
    {
        return (bool) preg_match($strict ? $this::VAR_STRICT_REGEX_VALID : $this::VAR_REGEX_VALID, $var);
    }
public function isValid ( string $ var , bool $ strict = true ) : bool { return ( bool ) preg_match ( $ strict ? $ this :: VAR_STRICT_REGEX_VALID : $ this :: VAR_REGEX_VALID , $ var ) ; }
Validate var.

@since 160220 Initial release.

@param string $var    Var.
@param bool   $strict Strict?

@return bool True if var is valid.
Validate var .