blob: ab7a20ac86b98640571cd39a1e0083d0aa72595a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
Array unpacking does not work with non-integer/string keys
--FILE--
<?php
function gen() {
yield [] => 1;
yield 1.23 => 123;
}
try {
[...gen()];
} catch (Error $ex) {
echo "Exception: " . $ex->getMessage() . "\n";
}
?>
--EXPECT--
Exception: Keys must be of type int|string during array unpacking
|