|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-12-10 12:12 UTC] nikic@php.net
[2019-12-10 12:12 UTC] nikic@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 13:00:01 2025 UTC |
Description: ------------ php -d opcache.preload=preload.php script.php preload.php: <?php class A { const C = UNRESOLVED; } class B extends A { const C = 42; } script.php: <?php var_dump(class_exists(A::class)); var_dump((new ReflectionClass(B::class))->getParentClass()->newInstance()); Class A will be removed from the preload state because it has unresolved initializers. However in the meantime B has already been linked, which is preloaded. The end result is that class B has a missing parent class when preloaded.