note 104991 deleted from reflectionmethod.invoke by danbrown

From: Date: Thu, 21 Jul 2011 15:59:36 +0000
Subject: note 104991 deleted from reflectionmethod.invoke by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-181754@lists.php.net to get a copy of this message
Note Submitter: templargrey at wp dot pl ---- Seems that Reflection doesn`t resolve late static bindings - var_dump will show "string 'a' (length=1)". <pre> class ParentClass { protected static $a = 'a'; static public function init() { return static::$a; } } class ChildClass extends ParentClass { protected static $a = 'b'; } $r = new ReflectionClass('ChildClass'); var_dump($r->getMethod('init')->invoke(null)); </pre>

« previous php.notes (#181754) next »