<?php abstract class A { public function toArray() { return get_object_vars($this); } } class C extends A { private $private = 'A'; protected $protected = 'B'; public $public = 'C'; } $c = new C; print_r($c->toArray());
You have javascript disabled. You will not be able to edit any code.