namespace foo;
class a
{
private $bar;
public $baz;
protected $alpha
}
$reflect=new \ReflectionClass('a');
$properties=$reflect->getProperties(ReflectionProperty::IS_PROTECTED);
It will return ReflectionProperty class not found Fatal error Where $properties is array of object of ReflectionProperty. Why does not it resolved to global space automatically? where as DOM related class do that implicitly. if ReflectionProperty class is used in namespace it works though. but why not implicitly it happends?
class in namespace will be preceeded by namespace name and global property needs to be preceeded by slash(\). use manual
Try this