|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-17 13:47 UTC] jani@php.net
[2007-08-17 14:24 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 09:00:01 2025 UTC |
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)