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
407 B
25 lines
407 B
--TEST--
|
|
array_push retains its required array argument when an unpacked list is empty
|
|
--FILE--
|
|
<?php
|
|
|
|
function main(): void
|
|
{
|
|
// Keep the required by-reference argument before an empty unpack.
|
|
$values = [];
|
|
array_push($values, ...[]);
|
|
var_dump($values);
|
|
|
|
array_push($values, ...[1, 2]);
|
|
var_dump($values);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
array(0) {
|
|
}
|
|
array(2) {
|
|
[0]=>
|
|
int(1)
|
|
[1]=>
|
|
int(2)
|
|
}
|
|
|