summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_045.phpt
blob: 6ffce8342e79244e3d117f841e219362ab4b7766 (plain)
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";
?>
--EXPECT--
Done.