php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80635 The link of "use" Keyword in "List of Keywords" needs improvement.
Submitted: 2021-01-16 10:26 UTC Modified: 2025-04-25 08:51 UTC
From: hen20-xmp at yahoo dot co dot jp Assigned: vrana (profile)
Status: Closed Package: *General Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2021-01-16 10:26 UTC] hen20-xmp at yahoo dot co dot jp
Description:
------------
Target Manual page is "List of Keywords" (reserved.keywords.html).

First, the link of "use" Keyword should not be to "Namespaces" (language.namespaces.html) : almost meanless, 
but strictly, to "Using namespaces: Aliasing/Importing" (language.namespaces.importing.html).

This "use" is used for 
(1) importing a Class in a Namespace & aliasing it,
(2) importing a Namespace,
(3) importing a global Class,
(4) importing a function, & aliasing it,
(5) importing a constant
according to the link page.

This "use" Keyword may be accompanied by "(as of PHP 5.3.0)".


Second, there would exist ADDITIONAL "use" Keyword in the list.
This "use" is used for inheriting variables from the parent scope in closures.

This "use" Keyword should link to "Example #3" in "Anonymous functions" (functions.anonymous.html#example-180".

Expected result:
----------------
(See Description)

Actual result:
--------------
(See Description)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2025-04-25 08:51 UTC] vrana@php.net
https://github.com/php/doc-en/commit/a63b9c7541 improves the link, I didn't find a nice way how to link also the use in anonymous functions.
 [2025-04-25 08:51 UTC] vrana@php.net
-Status: Open +Status: Closed -Package: Documentation problem +Package: *General Issues -Assigned To: +Assigned To: vrana
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Apr 30 22:01:28 2025 UTC