Bug #74576 [Com]: opcache do not update class constant after uopz_redefine

From: Date: Wed, 13 Dec 2017 04:08:46 +0000
Subject: Bug #74576 [Com]: opcache do not update class constant after uopz_redefine
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213075@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74576&edit=1 ID: 74576 Comment by: kejinjin at gmail dot com Reported by: kejinjin at gmail dot com Summary: opcache do not update class constant after uopz_redefine Status: No Feedback Type: Bug Package: opcache Operating System: CentOS7x64 PHP Version: 7.1.4 Assigned To: cmb Block user comment: N Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. =============================================================== When I try to change bug status to "Re-Opened", it says: You aren't allowed to change a bug to that state. Previous Comments: ------------------------------------------------------------------------ [2017-12-13 04:04:36] kejinjin at gmail dot com Are you loading uopz *before* OPcache? ========================================== Yes, I'm sure I load uopz before OPcache. ------------------------------------------------------------------------ [2017-11-05 04:22:44] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2017-10-03 16:43:57] cmb@php.net Are you loading uopz *before* OPcache? ------------------------------------------------------------------------ [2017-05-12 06:08:02] kejinjin at gmail dot com PS: PHP version is 7.1.4 ------------------------------------------------------------------------ [2017-05-12 05:47:25] kejinjin at gmail dot com Description: ------------ I use uopz_redefine to redefine class constants (uopz called zend_declare_class_constant) when opcache is enabled, I cannot get the new class constant through Foo::BAR. Test script: --------------- <?php class Foo { const BAR = '123'; } var_dump(Foo::BAR);// A1: try to comment this (function () { var_dump(Foo::BAR); // B1: try to comment this uopz_redefine('Foo', 'BAR', '456'); var_dump(Foo::BAR); // B2: compare })(); (function () { var_dump(Foo::BAR); // new scope })(); var_dump((new ReflectionClass('Foo'))->getConstant('BAR')); // also OK var_dump(Foo::BAR); // A2: compare Expected result: ---------------- '123' '123' '456' '456' '456' '456' Actual result: -------------- '123' '123' '123' (it is '456' if line B1 is commented) '456' '456' '123' (it is '456' if line A1 is commented) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74576&edit=1

« previous php.bugs (#213075) next »