php-src/Zend/tests/array_unpack/in_destructuring_2.phpt
Nikita Popov f555544faf Fix incorrect access of AST_UNPACK
list_is_keyed() did not take into account that there may be
AST_UNPACK elements. These would error lateron anyway, but still
produce an invalid access here.
2021-10-12 17:16:58 +02:00

10 lines
216 B
PHP

--TEST--
Spread operator is not supported in destructuring assignments (only spread)
--FILE--
<?php
[...$x] = [1, 2, 3];
?>
--EXPECTF--
Fatal error: Spread operator is not supported in assignments in %s on line %d