mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
19 lines
246 B
PHP
19 lines
246 B
PHP
--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.
|