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.
33 lines
679 B
33 lines
679 B
<?php
|
|
function phpunit_multi_values(): array
|
|
{
|
|
$first = 1;
|
|
$second = 'two';
|
|
return [$first, $second];
|
|
}
|
|
|
|
function phpunit_multi_consumer(): void
|
|
{
|
|
[$first, $second] = phpunit_multi_values();
|
|
$array = phpunit_multi_values();
|
|
|
|
[$partialFirst, $partialSecond] = phpunit_multi_three_values();
|
|
[$overflowFirst, $overflowSecond, $overflowThird] = phpunit_multi_values();
|
|
}
|
|
|
|
function phpunit_multi_three_values(): array
|
|
{
|
|
return [1, 2, 3];
|
|
}
|
|
|
|
function phpunit_multi_repeated_value(): array
|
|
{
|
|
$repeated = 'value';
|
|
$tail = 'tail';
|
|
return [$repeated, $repeated, $tail];
|
|
}
|
|
|
|
function phpunit_multi_side_effect(): array
|
|
{
|
|
return [time(), 2];
|
|
}
|
|
|