<?php class foo { public $a = 1; protected $b = 2; private $c = 3; private $d = 4; public function __toArray() { return array(4); } } $foo = new Foo; print_r((array)$foo);
You have javascript disabled. You will not be able to edit any code.