3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Mother { function getProperties(){ return get_class_vars(get_class($this)); } } class Child extends Mother{ protected $one = 1; protected $two = 2; } $c = new Child; var_dump($c->getProperties());

preferences:
25.51 ms | 405 KiB | 5 Q