php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74098 Misleading information on static function calls.
Submitted: 2017-02-15 09:08 UTC Modified: 2017-02-17 18:22 UTC
From: apokryfos84 at gmail dot com Assigned: cmb (profile)
Status: Closed 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: apokryfos84 at gmail dot com
New email:
PHP Version: OS:

 

 [2017-02-15 09:08 UTC] apokryfos84 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/functions.anonymous
---

It reads: 
"As of PHP 5.4, anonymous functions may be declared statically. This prevents them from having the current class automatically bound to them. Objects may also not be bound to them at runtime."

However both examples provided are using a PHP 7+ syntax of declaring and instantly calling a function. This requires some clarification. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-17 17:39 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2017-02-17 17:39 UTC] cmb@php.net
Also anonymous classes are available only as of PHP 7.0.0.
 [2017-02-17 18:18 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2017-02-17 18:21 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=341922
Log: Fix #74098: Misleading information on static function calls.

A feature that is available as of PHP 5.4.0 should not be exemplified
by code requiring a newer version, even though the example would be
less verbose.
 [2017-02-17 18:22 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2017-02-17 18:22 UTC] cmb@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.
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=b896533ae5029ca337205d171a73d3cc876bb735
Log: Fix #74098: Misleading information on static function calls.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 13:00:02 2026 UTC