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.
 
 

12 lines
289 B

<?php
function main(int $argc, array $argv): void
{
$iterations = $argc > 1 ? (int) $argv[1] : 10000000;
$items = [];
$checksum = 0;
for ($i = 0; $i < $iterations; ++$i) {
$items[$i % 100] = $i;
$checksum += count($items);
}
echo $checksum, "\n";
}