|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-26 14:16 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 07:00:01 2025 UTC |
Description: ------------ If a closure is declared in a statically called method it cannot be executed. Reproduce code: --------------- --TEST-- Closure 023: Closure declared in statically called method --FILE-- <?php class foo { public static function bar() { $func = function() { echo "Done"; }; $func(); } } foo::bar(); ?> --EXPECTF-- Done Actual result: -------------- Non-static method foo::() cannot be called statically in ...