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.
24 lines
413 B
24 lines
413 B
<?php
|
|
/**
|
|
* This file is part of TypePHP(AOT).
|
|
*
|
|
* @link https://www.swoole.com/aot/
|
|
* @contact service@swoole.com
|
|
*/
|
|
|
|
function bump(): int
|
|
{
|
|
echo "bump\n";
|
|
return 1;
|
|
}
|
|
|
|
function main(): void
|
|
{
|
|
$rest = [1, 2, 3, 4, 5];
|
|
$i = 0;
|
|
|
|
echo count([bump(), bump()]), "\n";
|
|
echo count(['a' => 1, 'a' => 2]), "\n";
|
|
echo count([...$rest, 9]), "\n";
|
|
echo count([$i++, $i++]), "\n";
|
|
}
|
|
|