mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
7aacc705d0
Closes GH-5958
21 lines
301 B
PHP
21 lines
301 B
PHP
--TEST--
|
|
Closure 052: static::class in non-static closure in static method.
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
static function foo() {
|
|
$f = function() {
|
|
return static::class;
|
|
};
|
|
return $f();
|
|
}
|
|
}
|
|
|
|
class B extends A {}
|
|
|
|
var_dump(B::foo());
|
|
?>
|
|
--EXPECT--
|
|
string(1) "B"
|