3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { private $privateProperty = '7Learn.com'; } $obj = new Foo; $reflector = new ReflectionClass($obj); $property = $reflector->getProperty('privateProperty'); //$property->setAccessible(true); var_dump($property->getValue($obj));

preferences:
50.9 ms | 1108 KiB | 5 Q