|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79178 [parse_url] underscore at end of host
Submitted: 2020-01-27 19:22 UTC Modified: -
From: progr-d at yandex dot ru Assigned:
Status: Open Package: *URL Functions
PHP Version: 7.3.14 OS: macOS 10.13.6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-01-27 19:22 UTC] progr-d at yandex dot ru
When processing a file through function `file`, I met this feature, which I could not have expected in this place.
Yes, I know that you need to use flag FILE_IGNORE_NEW_LINES, but having received an underscore, for a long time I could not understand where it came from.

Test script:
var_dump(parse_url('' . PHP_EOL, PHP_URL_HOST));

Expected result:
string(10) ""



Actual result:
string(10) "yandex.ru_"


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Feb 20 07:01:25 2020 UTC