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.
 
 

22 lines
315 B

--TEST--
Loop var optimizer: for counter with typed int function bound
--FILE--
<?php
function limit_value(): int {
return 5;
}
function main(): void {
$last = -1;
for ($i = 0; $i < limit_value(); $i++) {
$last = $i;
}
var_dump($i);
var_dump($last);
}
?>
--EXPECT--
int(5)
int(4)