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: -
From: hen20-xmp at yahoo dot co dot jp Assigned:
Status: Open Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
15 - 15 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 22:03:34 2021 UTC