We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
see https://bugs.php.net/bug.php?id=74576
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.
<?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
'123' '123' '456' '456' '456' '456'
'123' '123' '123' (it is '456' if line B1 is commented) '456' '456' '123' (it is '456' if line A1 is commented)
The text was updated successfully, but these errors were encountered:
Are you loading uopz before opcache as per the docs?
Sorry, something went wrong.
yes
This will be fixed in the next release, sorry I forgot to tag ...
No branches or pull requests
see https://bugs.php.net/bug.php?id=74576
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:
Expected result:
Actual result:
The text was updated successfully, but these errors were encountered: