mirror of
https://github.com/php/php-src.git
synced 2026-04-21 23:18:13 +02:00
52d3d0d8d7
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.
11 lines
190 B
PHP
11 lines
190 B
PHP
--TEST--
|
|
Dynamic class name in new is not supported
|
|
--FILE--
|
|
<?php
|
|
|
|
static $x = new (FOO);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use dynamic class name in constant expression in %s on line %d
|