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.
 
 

25 lines
412 B

<?php
function nativeCondition(array $values): int
{
if ($values[0] === 1) {
return 1;
}
if ($values[0] === 2 || $values[1] === 3) {
return 2;
}
return 0;
}
function dynamicConditionValue(mixed $value): mixed
{
return $value;
}
function dynamicCondition(array $values): bool
{
if (dynamicConditionValue($values[0])) {
return true;
}
return false;
}