php-src/Zend/tests/list_014.phpt
Nikita Popov ab304579ff Forbid use of array() in nested destructuring
Previously array() was only forbidden on the outermost level.
2016-07-06 21:15:54 +02:00

12 lines
202 B
PHP

--TEST--
Cannot destructure using array(), even if nested
--FILE--
<?php
[array($a)] = [array(42)];
var_dump($a);
?>
--EXPECTF--
Fatal error: Cannot assign to array(), use [] instead in %s on line %d