[php-src] Issue #8370: parse_url mistakes hostname with path
| From: | ppodgorskicrido | Date: | Thu, 14 Apr 2022 09:37:18 +0000 |
| Subject: | [php-src] Issue #8370: parse_url mistakes hostname with path | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240954@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8370
Author: ppodgorskicrido
### Description
The following code:
```php
<?php
var_dump(parse_url('www.j-p.pl'));
```
Resulted in this output:
array(1) {
["path"]=>
string(10) "www.j-p.pl"
}
But I expected this output instead:
array(1) {
["host"]=>
string(10) "www.j-p.pl"
}
### PHP Version
PHP 8.1.4
### Operating System
Windows 10