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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC