|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-06-09 13:26 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2017-06-09 13:26 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 21:00:02 2025 UTC |
Description: ------------ If you declare a closure as a static member of a class, you cannot call it directly. Test script: --------------- class T { public static $f; } T::$f = function() { echo "static member\n"; }; $f = function() { echo "local variable\n"; }; $f(); T::$f(); Expected result: ---------------- local variable static member Actual result: -------------- local variable Fatal error: Uncaught Error: Function name must be a string