Bug #79487 [Asn->Csd]: ::getStaticProperties() ignores property modifications
Edit report at https://bugs.php.net/bug.php?id=79487&edit=1
ID: 79487
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: ::getStaticProperties() ignores property
modifications
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: Windows
PHP Version: 7.4Git-2020-04-17 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a895bb6885fbceea3e8375816969d5510d8d082e
Log: Fix #79487: ::getStaticProperties() ignores property modifications
Previous Comments:
------------------------------------------------------------------------
[2020-04-21 13:16:15] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #79487: ::getStaticProperties() ignores property modifications
On GitHub: https://github.com/php/php-src/pull/5429
Patch: https://github.com/php/php-src/pull/5429.patch
------------------------------------------------------------------------
[2020-04-18 15:28:58] cmb@php.net
This regression has apparently been introduced with commit
d57cd36[1], and is not particularly related to Windows.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=d57cd36e47b627dee5b825760163f8e62e23ab28>
------------------------------------------------------------------------
[2020-04-17 16:36:19] cmb@php.net
Description:
------------
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:
---------------
<?php
class Foo {
public static $bar = 'orig';
}
Foo::$bar = 'new';
$rc = new ReflectionClass('Foo');
var_dump($rc->getStaticProperties());
?>
Expected result:
----------------
array(1) {
["bar"]=>
string(3) "new"
}
Actual result:
--------------
array(1) {
["bar"]=>
string(4) "orig"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79487&edit=1
Thread (4 messages)