Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Parse a URL and return its components
<?php parse_url(string $url, int $component = -1): int|string|array|null|false
<?php         $url = preg_replace('#^((?:pdo_)?sqlite3?):///#', '$1://localhost/', $params['url']);

        assert(is_string($url));



        $url = parse_url($url);



        if ($url === false) {

            throw new Exception('Malformed parameter "url".');