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.
29 lines
506 B
29 lines
506 B
--TEST--
|
|
use function alias resolves imported function name
|
|
--FILE--
|
|
<?php
|
|
namespace FunctionAlias\Lib {
|
|
function normalize(string $value): string
|
|
{
|
|
return strtolower(trim($value));
|
|
}
|
|
}
|
|
|
|
namespace FunctionAlias\App {
|
|
use function FunctionAlias\Lib\normalize as clean_name;
|
|
|
|
function run_alias(): void
|
|
{
|
|
var_dump(clean_name(' AOT '));
|
|
}
|
|
}
|
|
|
|
namespace {
|
|
function main(): void
|
|
{
|
|
FunctionAlias\App\run_alias();
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(3) "aot"
|
|
|