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