3 public $pub = 'C::$pub';
4 protected $prot = 'C::$prot';
5 private $priv = 'C::$priv';
7 public static function show() {
8 echo "in C: accessing C\n";
9 var_dump(get_class_vars('C'));
11 echo "in C: accessing D\n";
12 var_dump(get_class_vars('D'));
14 echo "in C: accessing E\n";
15 var_dump(get_class_vars('E'));
20 public $pub_from_d = 'D::$pub_from_d';
21 protected $prot_from_d = 'D::$prot_from_d';
22 private $priv_from_d = 'D::$priv_from_d';
24 public static function show() {
25 echo "in D: accessing C\n";
26 var_dump(get_class_vars('C'));
28 echo "in D: accessing D\n";
29 var_dump(get_class_vars('D'));
31 echo "in D: accessing E\n";
32 var_dump(get_class_vars('E'));
37 private $priv = 'E::$priv'; // same name as C::$priv
39 public static function show() {
40 echo "in E: accessing C\n";
41 var_dump(get_class_vars('C'));
43 echo "in E: accessing D\n";
44 var_dump(get_class_vars('D'));
46 echo "in E: accessing E\n";
47 var_dump(get_class_vars('E'));
53 public static $pub = 'SC::$pub';
54 protected static $prot = 'SC::$prot';
55 private static $priv = 'SC::$priv';
57 public static function show() {
58 echo "in SC: accessing SC\n";
59 var_dump(get_class_vars('SC'));
61 echo "in SC: accessing SD\n";
62 var_dump(get_class_vars('SD'));
64 echo "in SC: accessing SE\n";
65 var_dump(get_class_vars('SE'));
70 public static $pub_from_d = 'SD::$pub_from_d';
71 protected static $prot_from_d = 'SD::$prot_from_d';
72 private static $priv_from_d = 'SD::$priv_from_d';
74 public static function show() {
75 echo "in SD: accessing SC\n";
76 var_dump(get_class_vars('SC'));
78 echo "in SD: accessing SD\n";
79 var_dump(get_class_vars('SD'));
81 echo "in SD: accessing SE\n";
82 var_dump(get_class_vars('SE'));
87 private static $priv = 'SE::$priv'; // same name as SC::$priv
89 public static function show() {
90 echo "in SE: accessing SC\n";
91 var_dump(get_class_vars('SC'));
93 echo "in SE: accessing SD\n";
94 var_dump(get_class_vars('SD'));
96 echo "in SE: accessing SE\n";
97 var_dump(get_class_vars('SE'));
102 echo ">>> testing instance variables from global scope\n";
103 echo "accessing C\n";
104 var_dump(get_class_vars('C'));
106 echo "accessing D\n";
107 var_dump(get_class_vars('D'));
109 echo "accessing E\n";
110 var_dump(get_class_vars('E'));
112 echo ">>> testing instance variables from class scope\n";
117 echo ">>> testing static variables from global scope\n";
118 echo "accessing SC\n";
119 var_dump(get_class_vars('SC'));
121 echo "accessing SD\n";
122 var_dump(get_class_vars('SD'));
124 echo "accessing SE\n";
125 var_dump(get_class_vars('SE'));
127 echo ">>> testing static variables from class scope\n";