3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private $private = 'private'; public $public = 'public'; } $r = new \ReflectionClass('A'); $p = $r->getProperty('private'); $p->setAccessible(true); $p->setAccessible(false); var_dump($p->getValue(new A())); $p = $r->getProperty('public'); $p->setAccessible(false); var_dump($p->getValue(new A()));