|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-05-08 18:06 UTC] levim@php.net
-Status: Open
+Status: Duplicate
[2014-05-08 18:06 UTC] levim@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 22:00:02 2025 UTC |
Description: ------------ When a parent class has a static method with a closure in it is passes the wrong called_scope name (via self, static, get_called_class()) to the closure. Test script: --------------- <?php class Foo { public static function blah() { $foo = function(){ var_dump(get_called_class()); }; $foo(); } } class Bar extends Foo { } Bar::blah(); Expected result: ---------------- string(3) "Bar" Actual result: -------------- string(3) "Foo"