3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = (object)array('a', 'b', 'c'); $refl = new \ReflectionObject($obj); $props = $refl->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED); print_r($props); foreach($props as $prop) print $prop->name; print_r(get_object_vars($obj)); print_r($obj);

preferences:
49.93 ms | 402 KiB | 5 Q