ID: 42258 Updated by: [EMAIL PROTECTED] Reported By: vincent dot hoen at gmail dot com -Status: Open +Status: Assigned Bug Type: Class/Object related Operating System: windows xp PHP Version: 5.2.4RC1 -Assigned To: +Assigned To: johannes New Comment:
Assigned to the maintainer of reflection extension. Previous Comments: ------------------------------------------------------------------------ [2007-08-09 15:30:58] vincent dot hoen at gmail dot com Description: ------------ ReflectionProperty::getDefaultValue() returns null only if the property is not static. Reproduce code: --------------- class test{ public $test = 'aze'; static $stat = 'ic'; } $class = new ReflectionClass('test'); foreach($class->getProperties() as $k => $v){ var_dump($v->getValue($class)); } Expected result: ---------------- string 'aze' (length=3) string 'ic' (length=2) Actual result: -------------- null string 'ic' (length=2) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42258&edit=1