2 Test ReflectionProperty::isDefault() usage.
6 function reflectProperty($class, $property) {
7 $propInfo = new ReflectionProperty($class, $property);
8 echo "**********************************\n";
9 echo "Reflecting on property $class::$property\n\n";
10 echo "isDefault():\n";
11 var_dump($propInfo->isDefault());
12 echo "\n**********************************\n";
17 static public $stat = "static property";
19 private $priv = "keepOut";
22 reflectProperty("TestClass", "pub");
23 reflectProperty("TestClass", "stat");
24 reflectProperty("TestClass", "prot");
25 reflectProperty("TestClass", "priv");
29 **********************************
30 Reflecting on property TestClass::pub
35 **********************************
36 **********************************
37 Reflecting on property TestClass::stat
42 **********************************
43 **********************************
44 Reflecting on property TestClass::prot
49 **********************************
50 **********************************
51 Reflecting on property TestClass::priv
56 **********************************