xref: /PHP-8.4/ext/opcache/tests/gh9968.phpt (revision 91b3b58f)
1--TEST--
2GH-9968: Preload crash on non-linked class
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.preload={PWD}/gh9968-1.inc
8--EXTENSIONS--
9opcache
10--SKIPIF--
11<?php
12if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
13?>
14--FILE--
15<?php
16
17new Root1_Constant_Referencer();
18
19?>
20==DONE==
21--EXPECTF--
22Warning: Can't preload unlinked class Root1_Constant_Referencer: Unknown parent Root2_Empty_Empty in %s on line %d
23
24Fatal error: Uncaught Error: Class "Root1_Constant_Referencer" not found in %s:%d
25Stack trace:
26#0 {main}
27  thrown in %s on line %d
28