note 70478 added to language.oop5.reflection

From: Date: Wed, 18 Oct 2006 13:20:23 +0000
Subject: note 70478 added to language.oop5.reflection
Groups: php.notes 
Request: Send a blank email to php-notes+get-118685@lists.php.net to get a copy of this message
<?php # ReflectionProperty::getDeclaringClass() appears to be broken class A { public $public; protected $protected; private $private; } class B extends A { } $r = new ReflectionClass('B'); foreach($r->getProperties() as $p) { print_r($p); printf('(Declared by %s)<br />', $p->getDeclaringClass()->getName()); } # Returns: # ReflectionProperty Object ( [name] => public [class] => B ) (Declared by A) # ReflectionProperty Object ( [name] => protected [class] => B ) (Declared by B) ?> ---- Server IP: 85.116.0.130 Probable Submitter: 62.56.100.148 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.reflection.php Edit -- https://master.php.net/note/edit/70478 Del: integrated -- https://master.php.net/note/delete/70478/integrated Del: useless -- https://master.php.net/note/delete/70478/useless Del: bad code -- https://master.php.net/note/delete/70478/bad+code Del: spam -- https://master.php.net/note/delete/70478/spam Del: non-english -- https://master.php.net/note/delete/70478/non-english Del: in docs -- https://master.php.net/note/delete/70478/in+docs Del: other reasons-- https://master.php.net/note/delete/70478 Reject -- https://master.php.net/note/reject/70478 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118685) next »