mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Though first-class callables are now supported in constant expressions, they remain unsupported for the new expression. Fixes GH-20113 Closes GH-20115
9 lines
193 B
PHP
9 lines
193 B
PHP
--TEST--
|
|
GH-20113: new Foo(...) error in constant expressions
|
|
--FILE--
|
|
<?php
|
|
const C = new \stdClass(...);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot create Closure for new expression in %s on line %d
|