|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #41884 ReflectionClass::getDefaultProperties() does not handle static attributes
Submitted: 2007-07-03 08:35 UTC Modified: 2007-07-11 22:07 UTC
From: Assigned: tony2001 (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5CVS-2007-07-03 (CVS) OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2007-07-03 08:35 UTC]
Static properties with default values do not appear in the result of ReflectionClass::getDefaultProperties().

Reproduce code:
class Foo
    protected static $fooStatic = 'foo';
    protected $foo = 'foo';

$class = new ReflectionClass('Foo');


Expected result:
    [fooStatic] => foo
    [foo] => foo

Actual result:
    [foo] => foo


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-03 09:10 UTC]
Here is a patch for it:
but I'd like to hear Marcus opinion before committing it.

 [2007-07-11 22:07 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 09:01:29 2024 UTC