xref: /PHP-8.2/Zend/tests/gh7771_3.phpt (revision f8b9030b)
1--TEST--
2GH-7771.3 (Incorrect file/line for class constant expression exceptions)
3--FILE--
4<?php
5$classlist = [
6    'space1\C' => 'class y{const y="$y";}',
7    'D' => 'class D{const HW=space1\C::y;}'
8];
9spl_autoload_register(function($class) use ($classlist) {
10    eval($classlist[$class]);
11});
12var_dump(D::HW);
13?>
14--EXPECTF--
15Fatal error: Constant expression contains invalid operations in %sgh7771_3.php(7) : eval()'d code on line 1
16
17