1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
--TEST-- Closure 045: Closures created in static methods are not implicitly static --FILE-- <?php class A { static function foo() { return function () {}; } } $a = A::foo(); $a->bindTo(new A); echo "Done.\n"; --EXPECTF-- Done.