xref: /PHP-8.4/Zend/tests/gh10356.phpt (revision 848a6e50)
1--TEST--
2GH-10356: Incorrect line number of constant in constant expression
3--FILE--
4<?php
5
6final class Foo {
7    public static $foo = [
8        'foo' => DOES_NOT_EXIST,
9    ];
10}
11
12new Foo();
13
14?>
15--EXPECTF--
16Fatal error: Uncaught Error: Undefined constant "DOES_NOT_EXIST" in %s:5
17Stack trace:
18#0 %s(%d): [constant expression]()
19#1 {main}
20  thrown in %s on line 5
21