|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79487 ::getStaticProperties() ignores property modifications
Submitted: 2020-04-17 16:36 UTC Modified: 2020-06-23 16:45 UTC
From: Assigned: cmb (profile)
Status: Closed Package: Reflection related
PHP Version: 7.4Git-2020-04-17 (Git) OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2020-04-17 16:36 UTC]
If OPcache is enabled, any changes to static properties are not
recognized by ReflectionClass::getStaticProperties(); instead the
original values are returned.  This happens as of PHP 7.4.

Test script:
class Foo {
    public static $bar = 'orig';

Foo::$bar = 'new';
$rc = new ReflectionClass('Foo');

Expected result:
array(1) {
  string(3) "new"

Actual result:
array(1) {
  string(4) "orig"


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-04-18 15:28 UTC]
This regression has apparently been introduced with commit
d57cd36[1], and is not particularly related to Windows.

[1] <;a=commit;h=d57cd36e47b627dee5b825760163f8e62e23ab28>
 [2020-04-21 13:15 UTC]
-Assigned To: +Assigned To: cmb
 [2020-04-21 13:16 UTC]
The following pull request has been associated:

Patch Name: Fix #79487: ::getStaticProperties() ignores property modifications
On GitHub:
 [2020-06-23 16:45 UTC]
-Package: opcache +Package: Reflection related
 [2020-06-23 16:53 UTC]
Automatic comment on behalf of
Log: Fix #79487: ::getStaticProperties() ignores property modifications
 [2020-06-23 16:53 UTC]
-Status: Assigned +Status: Closed
 [2020-06-23 17:31 UTC]
Automatic comment on behalf of
Log: Revert &quot;Fix #79487: ::getStaticProperties() ignores property modifications&quot;
 [2020-06-24 08:09 UTC]
Automatic comment on behalf of
Log: Fix #79487: ::getStaticProperties() ignores property modifications
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jul 12 23:01:26 2020 UTC