|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78014 Preloaded classes may depend on non-preloaded classes due to unresolved consts
Submitted: 2019-05-15 09:56 UTC Modified: 2019-05-15 09:57 UTC
From: Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: master-Git-2019-05-15 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
35 + 38 = ?
Subscribe to this entry?

 [2019-05-15 09:56 UTC]
Test scripts in Run with -d opcache.preload=p1.php p3.php.

To make the failure more obvious, add

$r = new ReflectionClass('C');
var_dump((string) $r->getParentClass());

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

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-15 09:57 UTC]
-Assigned To: +Assigned To: dmitry
 [2019-05-20 15:16 UTC]
Automatic comment on behalf of
Log: Fixed bug #78014 (Preloaded classes may depend on non-preloaded classes due to unresolved consts)
 [2019-05-20 15:16 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 04:01:31 2024 UTC