|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-19 03:07 UTC] requinix@php.net
-Status: Open
+Status: Duplicate
[2016-05-19 03:07 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 07:00:01 2025 UTC |
Description: ------------ "self" in anonymous function indicates child class, behaving the same way as "static" Test script: --------------- class A { public static function func() { return function () { return new self(); }; } } class B extends A {} $b = B::func(); echo get_class($b()); Expected result: ---------------- A Actual result: -------------- B