blob: 19ed61f2ee334cbc71170d35757be2948d6e97e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Argument unpacking does not work with non-integer keys
--FILE--
<?php
function foo(...$args) {
var_dump($args);
}
function gen() {
yield 1.23 => 123;
yield "2.34" => 234;
}
try {
foo(...gen());
} catch (Error $ex) {
echo "Exception: " . $ex->getMessage() . "\n";
}
?>
--EXPECT--
Exception: Cannot unpack Traversable with non-integer keys
|