1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/gh20113.phpt
Ilija Tovilo 5a63f7a54b Fix missing new Foo(...) error in constant expressions
Though first-class callables are now supported in constant expressions, they
remain unsupported for the new expression.

Fixes GH-20113
Closes GH-20115
2025-10-09 19:09:01 +02:00

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