|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesfix-reflection-of-default-static-members (last revision 2010-05-12 13:45 UTC by mike@php.net)fix-refs-to-default-static-members (last revision 2010-05-12 13:42 UTC by mike@php.net) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-05-12 15:42 UTC] mike@php.net
[2010-05-12 15:45 UTC] mike@php.net
[2010-05-12 15:45 UTC] mike@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: dmitry
[2010-05-12 15:45 UTC] mike@php.net
[2010-05-13 07:20 UTC] ChadFulton at gmail dot com
[2010-05-21 11:29 UTC] mike@php.net
-Package: Reflection related
+Package: Scripting Engine problem
[2010-05-21 11:29 UTC] mike@php.net
[2010-05-26 18:45 UTC] dmitry@php.net
-Status: Assigned
+Status: Wont fix
[2010-05-26 18:45 UTC] dmitry@php.net
[2012-07-06 21:50 UTC] dev at pp3345 dot de
[2013-01-19 14:45 UTC] googleguy@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 01:00:01 2025 UTC |
Description: ------------ The array ReflectionClass's getDefaultProperties() method changes for static properties, depending upon what value the static property currently holds. I suppose there is an argument to be made that this is expected/desired, since static properties are meant to hold across all instances of the class. However, it doesn't seem like it necessarily fits as part of a function to get the *default* property. Test script: --------------- <?php class foo { static public $bar = 'true default value'; } $r = new ReflectionClass('foo'); print_r($r->getDefaultProperties()); foo::$bar = 'new static value, no longer default though'; print_r($r->getDefaultProperties()); ?> Expected result: ---------------- Array ( [bar] => true default value ) Array ( [bar] => true default value ) Actual result: -------------- Array ( [bar] => true default value ) Array ( [bar] => new static value, no longer default though )