Annotation of embedaddon/php/Zend/tests/closure_045.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Closure 045: Closures created in static methods are static, even without the keyword
3: --FILE--
4: <?php
5:
6: class A {
7: static function foo() {
8: return function () {};
9: }
10: }
11:
12: $a = A::foo();
13: $a->bindTo(new A);
14:
15: echo "Done.\n";
16:
17: --EXPECTF--
18: Warning: Cannot bind an instance to a static closure in %s on line %d
19: Done.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>