php-src/tests/classes/constants_error_004.phpt
Ilija Tovilo 9e097822e8
Fix lineno for all constant expressions
Fixes GH-8821
Closes GH-8855
2023-02-02 19:03:47 +01:00

17 lines
310 B
PHP

--TEST--
Class constant whose initial value references a non-existent class
--FILE--
<?php
class C
{
const c1 = D::hello;
}
$a = new C();
?>
--EXPECTF--
Fatal error: Uncaught Error: Class "D" not found in %s:%d
Stack trace:
#0 %s(%d): [constant expression]()
#1 {main}
thrown in %s on line %d