3v4l.org

run code in 200+ php & hhvm versions
<?php //namespace crm; class et{ protected $table = "b"; public $field = "d"; private $x = "private!"; public function dump(){ var_dump( array_map('get_object_vars', [$this]) ); } } $et = new et(); $et->dump();
based on vb4JV
Output for 7.1.0 - 7.3.1
array(1) { [0]=> array(3) { ["table"]=> string(1) "b" ["field"]=> string(1) "d" ["x"]=> string(8) "private!" } }
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.0.20
array(1) { [0]=> array(1) { ["field"]=> string(1) "d" } }