|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-19 13:55 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Feb 12 00:00:01 2026 UTC |
Description: ------------ When calling ReflectionProperty->getValue() on a public static property, getValue() requires an object instance to be passed in, even though this doesn't matter for static public properties. It would be nice if null could be passed in addition to an instance. Reproduce code: --------------- <?php class test { static public $a = 1; } $refl = new ReflectionProperty('test', 'a'); echo $refl->getValue(null); Expected result: ---------------- 1 Actual result: -------------- Warning: getValue() expects parameter 1 to be object, null given in Command line code on line 1