go to bug id or search bugs for
Test scripts in https://gist.github.com/nikic/39960cf61b18803fa522e6287cdb17cc. Run with -d opcache.preload=p1.php p3.php.
To make the failure more obvious, add
$r = new ReflectionClass('C');
to p3.php, as this will trigger an assertion failure.
The problem is that class B is removed from the preload state, because it has unresolved constants. However, class C is already linked to it. Then, at runtime, we may replace B with a different class.
Add a Patch
Add a Pull Request
Automatic comment on behalf of firstname.lastname@example.org
Log: Fixed bug #78014 (Preloaded classes may depend on non-preloaded classes due to unresolved consts)