[doc-en] master: Remove unnecessary backslash in `\UnhandledMatchError` in match documentation (fully qualified name in an example without namespaces)
(#5928)
| From: | Willy Bruns via GitHub | Date: | Mon, 12 Oct 2026 07:47:47 +0000 |
| Subject: | [doc-en] master: Remove unnecessary backslash in `\UnhandledMatchError` in match documentation (fully qualified name in an example without namespaces) (#5928) |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23832@lists.php.net to get a copy of this message | ||
Author: Willy Bruns (willy-b)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-12T09:47:44+02:00
Commit: https://github.com/php/doc-en/commit/f0aab5b5f496704a2c21e4960c9f620e19f6d3c4
Raw diff: https://github.com/php/doc-en/commit/f0aab5b5f496704a2c21e4960c9f620e19f6d3c4.diff
Remove unnecessary backslash in
\UnhandledMatchError in match documentation (fully
qualified name in an example without namespaces) (#5928)
At https://www.php.net/manual/en/control-structures.match.php#:~:text=catch%20(\UnhandledMatchError%20$e
) (archived as is at https://web.archive.org/web/20261011041611/https://www.php.net/manual/en/control-structures.match.php#:~:text=catch%20(\UnhandledMatchError%20$e
),
this removes what appears to be an unnecessary backslash in catch (\UnhandledMatchError
$e), replacing it with catch (UnhandledMatchError $e). The fully qualified name
starting with \ is not usually used in try/catch examples in the documentation where
there is not a special namespace used (see https://www.php.net/manual/en/language.namespaces.faq.php#language.namespaces.faq.qualified#:~:text=Fully%20Qualified%20names
, archived as is at https://web.archive.org/web/20261011041428/https://www.php.net/manual/en/language.namespaces.faq.php#:~:text=Fully%20Qualified%20names
).
No AI or LLMs were used in finding this or preparing this commit.
Changed paths:
M language/control-structures/match.xml
Diff:
diff --git a/language/control-structures/match.xml b/language/control-structures/match.xml
index 27fd69bfd419..5201f0aa6327 100644
--- a/language/control-structures/match.xml
+++ b/language/control-structures/match.xml
@@ -210,7 +210,7 @@ try {
1, 2 => foo(),
3, 4 => bar(),
};
-} catch (\UnhandledMatchError $e) {
+} catch (UnhandledMatchError $e) {
var_dump($e);
}
]]>