php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65902 Document `use` Keyword for Anonymous Functions
Submitted: 2013-10-15 17:30 UTC Modified: 2013-10-22 08:28 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cbarna at theatlantic dot com Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-10-15 17:30 UTC] cbarna at theatlantic dot com
Description:
------------
http://php.net/manual/en/functions.anonymous.php

The documentation for anonymous functions is lacking any mention of the `use` keyword introduced in PHP 5.3. However, the `use` keyword is used in a code sample without comment. This is confusing for a user who stumbles upon the keyword and doesn't know what it does.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-15 17:36 UTC] cbarna at theatlantic dot com
-Summary: Document Use Keyword for Anonymous Functions +Summary: Document `use` Keyword for Anonymous Functions
 [2013-10-15 17:36 UTC] cbarna at theatlantic dot com
Put quotes around `use` in title.
 [2013-10-22 08:26 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=331902
Log: #65902 clarify wording
 [2013-10-22 08:28 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-10-22 08:28 UTC] krakjoe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

There is not a need to document the `use` construct just for anonymous functions. Instead I have clarified the wording above the example mentioned, this should make the example clearer.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 10:02:33 2024 UTC