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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hen20-xmp at yahoo dot co dot jp
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC