Bug #79178 [NEW]: [parse_url] underscore at end of host

From: Date: Mon, 27 Jan 2020 19:22:02 +0000
Subject: Bug #79178 [NEW]: [parse_url] underscore at end of host
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225167@lists.php.net to get a copy of this message
From: progr-d at yandex dot ru Operating system: macOS 10.13.6 PHP version: 7.3.14 Package: *URL Functions Bug Type: Bug Bug description:[parse_url] underscore at end of host Description: ------------ 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('http://yandex.ru' . PHP_EOL, PHP_URL_HOST)); Expected result: ---------------- string(10) "yandex.ru" or Exception Actual result: -------------- string(10) "yandex.ru_" -- Edit bug report at https://bugs.php.net/bug.php?id=79178&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79178&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79178&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79178&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79178&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79178&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79178&r=support Expected behavior: https://bugs.php.net/fix.php?id=79178&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79178&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79178&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79178&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79178&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79178&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79178&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79178&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79178&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79178&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79178&r=mysqlcfg

« previous php.bugs (#225167) next »