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.
28 lines
413 B
28 lines
413 B
--TEST--
|
|
Namespace with constants defined via const keyword
|
|
--FILE--
|
|
<?php
|
|
namespace Foo\App {
|
|
class Printer {
|
|
public function print() {
|
|
echo "Hello World!\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
namespace Bar\App {
|
|
use Foo\App;
|
|
function test(){
|
|
$o = new App\Printer;
|
|
$o->print();
|
|
}
|
|
}
|
|
|
|
namespace {
|
|
function main() {
|
|
Bar\App\test();
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Hello World!
|