Bug #79360 [Com]: Unable to preload constants

From: Date: Thu, 19 Mar 2020 01:33:15 +0000
Subject: Bug #79360 [Com]: Unable to preload constants
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226174@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79360&edit=1 ID: 79360 Comment by: thedinosaurmail at gmail dot com Reported by: azjezz at protonmail dot com Summary: Unable to preload constants Status: Open Type: Bug Package: opcache PHP Version: 7.4.3 Block user comment: N Private report: N New Comment: Preloading is implemented as a part of the opcache on top of another (already committed) patch that introduces “immutable” classes and functions. https://wiki.php.net/rfc/preload Previous Comments: ------------------------------------------------------------------------ [2020-03-09 17:58:09] azjezz at protonmail dot com Description: ------------ Preloading doesn't support constants defined with either const or define Test script: --------------- // preload.php define('FOO', 'foo'); const BAR = 'bar'; class Baz {} // index.php var_dump(defined('FOO'), defined('BAR'), class_exists(Baz::class)); Expected result: ---------------- bool(true) bool(true) bool(true) Actual result: -------------- bool(false) bool(false) bool(true) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79360&edit=1

« previous php.bugs (#226174) next »