Bug->Doc #80431 [Opn->Ver]: parse_url() return fragment, query while there is not.
| From: | requinix@php.net | Date: | Fri, 27 Nov 2020 08:11:24 +0000 |
| Subject: | Bug->Doc #80431 [Opn->Ver]: parse_url() return fragment, query while there is not. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18158@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80431&edit=1
ID: 80431
Updated by: requinix@php.net
Reported by: kawewong at gmail dot com
Summary: parse_url() return fragment, query while there is
not.
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
Package: URL related
Operating System: Windows
PHP Version: 8.0.0
Block user comment: N
Private report: N
New Comment:
This is a deliberate change.
https://www.php.net/manual/en/migration80.incompatible.php
(search for "parse_url")
However, the function's docs could use a Changelog entry.
Previous Comments:
------------------------------------------------------------------------
[2020-11-27 08:06:47] kawewong at gmail dot com
Description:
------------
If I enter the URL like this "/path?#"
The
parse_url() function always return fragment and query array key while previous
versions of PHP like 5.x, 7.x doesn't return these value if not exists.
Expected result:
----------------
array(
'path' => '/path',
);
Actual result:
--------------
array(
'path' => '/path',
'query' => '',
'fragment' => '',
);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80431&edit=1