From 0254e633d2a0cf36c3b3a2ba19350019e12d3b4b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 24 Sep 2021 18:46:45 +0200 Subject: [PATCH] Fix #80431: parse_url() return fragment, query while there is not --- reference/url/functions/parse-url.xml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/reference/url/functions/parse-url.xml b/reference/url/functions/parse-url.xml index dd27d6b803..b8f378e9cb 100644 --- a/reference/url/functions/parse-url.xml +++ b/reference/url/functions/parse-url.xml @@ -118,6 +118,23 @@ int, in the case of PHP_URL_PORT) instead of an array. If the requested component doesn't exist within the given URL, &null; will be returned. + As of PHP 8.0.0, parse_url distinguishes absent and empty + queries and fragments: + + + + + + + + + + Previously all cases resulted in query and fragment being &null;. Note that control characters (cf. ctype_cntrl) in the @@ -125,6 +142,29 @@ + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + parse_url will now distinguish absent and empty queries + and fragments. + + + + + + + &reftitle.examples;