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.
31 lines
530 B
31 lines
530 B
<?php
|
|
|
|
function optimizerDynamicBool(): mixed
|
|
{
|
|
return true;
|
|
}
|
|
|
|
function optimizerTypedBool(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
function optimizerTypedInt(): int
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
function optimizerTypedFloat(): float
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
function optimizerTypedArgumentCalls(): void
|
|
{
|
|
in_array('1', [1], optimizerTypedBool());
|
|
hypot(optimizerTypedInt(), optimizerTypedFloat());
|
|
in_array('1', [1], optimizerTypedInt());
|
|
in_array('1', [1], optimizerDynamicBool());
|
|
strlen(null);
|
|
json_decode('null', null);
|
|
}
|
|
|