php类的成员变量没有声明
<br />class test{<br /> private $name;<br /> private $sex;<br /> function __construct(){<br /> $this->aaa='aaa';<br /> }<br />}<br /><br />$test=new test();<br /><br />$reflect=new ReflectionClass($test);<br />$pro=$reflect->getDefaultProperties();<br />print_r($pro);//打印结果:Array ( [name] => [sex] => )<br /><br />echo $test->aaa;//打印结果:aaa<br />