TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
478 B
34 lines
478 B
--TEST--
|
|
class static 003
|
|
--FILE--
|
|
<?php
|
|
namespace Test {
|
|
class Worker1
|
|
{
|
|
static function hello()
|
|
{
|
|
return new static();
|
|
}
|
|
|
|
static function foo()
|
|
{
|
|
return self::hello();
|
|
}
|
|
}
|
|
|
|
class Worker2 extends Worker1
|
|
{
|
|
}
|
|
}
|
|
|
|
namespace {
|
|
use Test\Worker2;
|
|
function main()
|
|
{
|
|
$o = Worker2::foo();
|
|
var_dump(get_class($o));
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(12) "Test\Worker2"
|
|
|