|  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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
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
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)


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Jun 01 23:03:37 2023 UTC