php-src/Zend/tests/constexpr/class_on_expression_in_constant_expression.phpt
DanielEScherzer 7b8a61a18c
Zend/tests: merge constant_expressions into constexpr, update names (#17872)
While reviewing the existing tests in the `constexpr` directory, I found that
some of the names were not updated to reflect the contents when the contents
were changed in #9301.

Follow-up to #15638
2025-02-21 18:37:39 +00:00

10 lines
220 B
PHP

--TEST--
::class on an expression cannot be used inside constant expressions
--FILE--
<?php
const A = [0]::class;
?>
--EXPECTF--
Fatal error: (expression)::class cannot be used in constant expressions in %s on line %d