codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?PHP class a { private $firstVar; public function foo() { $refclass = new ReflectionClass(new b()); foreach ($refclass->getProperties() as $property) { echo $property->name; //Access the property of B like this } } } class b extends a{ public $secondVar; } a::foo(); print_r( get_class_vars( 'b' ) );
Private
[
?
]
Run code
Submit