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.
 
 

27 lines
398 B

--TEST--
unset evaluates array dimension expressions left to right
--FILE--
<?php
function unset_key(string $key): string
{
echo "unset-key:$key\n";
return $key;
}
function main(): void
{
$items = ['a' => 1, 'b' => 2, 'c' => 3];
unset($items[unset_key('a')], $items[unset_key('c')]);
var_dump($items);
}
?>
--EXPECT--
unset-key:a
unset-key:c
array(1) {
["b"]=>
int(2)
}