1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
archived-php-src/Zend/tests/constexpr/new_arg_unpack.phpt
T
Nikita Popov 52d3d0d8d7 Add limited support for new in initializers
Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute arguments.

RFC: https://wiki.php.net/rfc/new_in_initializers

Closes GH-7153.
2021-07-13 14:03:20 +02:00

11 lines
235 B
PHP

--TEST--
Argument unpacking in new arguments in const expr (not yet supported)
--FILE--
<?php
static $x = new stdClass(...[0]);
?>
--EXPECTF--
Fatal error: Argument unpacking in constant expressions is not supported in %s on line %d