[php-src] Issue #20431: ext-uri removing the host
| From: | nyamsprod | Date: | Sat, 08 Nov 2025 22:07:13 +0000 |
| Subject: | [php-src] Issue #20431: ext-uri removing the host | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251193@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20431
Author: nyamsprod
### Description
The following code:
```php
<?php
echo Uri\Rfc3986\Uri::parse("https://example.com")->withHost(null)->toRawString(),
PHP_EOL;
echo Uri\Rfc3986\Uri::parse("https://example.com/")->withHost(null)->toRawString(),
PHP_EOL;
```
Resulted in this output:
```
http:/
http:/
```
But I expected this output instead:
```
http:
http:/
```
### PHP Version
```plain
not relevant
```
### Operating System
_No response_