summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_045.phpt
blob: c309e3c533a1c4f4298327d12ccc3f13130e14e3 (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.