public static function isValid($httpUri): bool
    {
        if ($httpUri instanceof self) {
            return true;
        }

        if (empty($httpUri) || !is_string($httpUri)) {
            return false;
        }

        try {
            self::fromString($httpUri);
        } catch (MalformedUri $murle) {
            return false;
        }

        return true;
    }
public static function isValid($httpUri): bool
    {
        if ($httpUri instanceof self) {
            return true;
        }

        if (empty($httpUri) || !is_string($httpUri)) {
            return false;
        }

        try {
            self::fromString($httpUri);
        } catch (MalformedUri $murle) {
            return false;
        }

        return true;
    }
public static function isValid ( $ httpUri ) : bool { if ( $ httpUri instanceof self ) { return true ; } if ( empty ( $ httpUri ) || ! is_string ( $ httpUri ) ) { return false ; } try { self :: fromString ( $ httpUri ) ; } catch ( MalformedUri $ murle ) { return false ; } return true ; }
checks whether given http uri is syntactically valid

@param   mixed  $httpUri
@return  bool
@since   7.1.0
checks whether given http uri is syntactically valid