1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/Zend/tests/arg_unpack/non_integer_keys.phpt
2020-02-03 22:52:20 +01:00

22 lines
369 B
PHP

--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