3v4l.org

run code in 300+ 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:
26.61 ms | 404 KiB | 5 Q