#41884 [Opn->Asn]: ReflectionClass::getDefaultProperties() does not handle static attributes
| From: | tony2001@php.net | Date: | Fri, 06 Jul 2007 13:58:37 +0000 |
| Subject: | #41884 [Opn->Asn]: ReflectionClass::getDefaultProperties() does not handle static attributes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114722@lists.php.net to get a copy of this message | ||
ID: 41884
Updated by: tony2001@php.net
Reported By: sebastian@php.net
-Status: Open
+Status: Assigned
Bug Type: Feature/Change Request
Operating System: Irrelevant
PHP Version: 5CVS-2007-07-03 (CVS)
-Assigned To:
+Assigned To: helly
Previous Comments:
------------------------------------------------------------------------
[2007-07-03 09:10:16] tony2001@php.net
Here is a patch for it: http://dev.daylessday.org/diff/bug41884.diff
but I'd like to hear Marcus opinion before committing it.
------------------------------------------------------------------------
[2007-07-03 08:35:29] sebastian@php.net
Description:
------------
Static properties with default values do not appear in the result of
ReflectionClass::getDefaultProperties().
Reproduce code:
---------------
<?php
class Foo
{
protected static $fooStatic = 'foo';
protected $foo = 'foo';
}
$class = new ReflectionClass('Foo');
print_r($class->getDefaultProperties());
Expected result:
----------------
Array
(
[fooStatic] => foo
[foo] => foo
)
Actual result:
--------------
Array
(
[foo] => foo
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41884&edit=1