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.
24 lines
338 B
24 lines
338 B
--TEST--
|
|
toObject keyword method with self::class
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public function run($obj) {
|
|
$o = $obj->toObject(self::class);
|
|
$o->bar();
|
|
}
|
|
|
|
public function bar() {
|
|
var_dump(__METHOD__);
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
$o = new Foo();
|
|
$o->run($o);
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(8) "Foo::bar"
|
|
|