|  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
 [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-2019 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:25 2019 UTC