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
518 B
34 lines
518 B
<?php
|
|
|
|
namespace App\python {
|
|
function len(array $value): int
|
|
{
|
|
return count($value);
|
|
}
|
|
|
|
final class math
|
|
{
|
|
public static function sqrt(int $value): int
|
|
{
|
|
return $value;
|
|
}
|
|
}
|
|
}
|
|
|
|
namespace App {
|
|
function relativePythonNameIsPhpClass(): int
|
|
{
|
|
return python\math::sqrt(16);
|
|
}
|
|
|
|
function relativePythonNameIsPhpFunction(): int
|
|
{
|
|
return python\len([1, 2, 3]);
|
|
}
|
|
}
|
|
|
|
namespace {
|
|
function main(): void
|
|
{
|
|
}
|
|
}
|
|
|