A library to reveal object internals.

Installs: 39 829

Dependents: 4

Suggesters: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1


v1.0.0 2017-08-07 11:46 UTC


AccessibleObject is small class allowing you to easily access internals of any object. In general, it's bad practice to do so. While we strongly discourage you to using it, it may be helpful in debugging or testing old, sad, legacy projects.


class Foo
    private $bar = 'baz';

$object = new Foo();
echo $object->bar; // PHP Fatal error:  Uncaught Error: Cannot access private property Foo::$bar

$accessibleObject = new AccessibleObject($object);
echo $accessibleObject->bar; // 'baz'