<?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'; } print_r(new C()->toArray());
You have javascript disabled. You will not be able to edit any code.