3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; private function taz() { return 'waz'; } } var_dump((new ReflectionProperty(Foo::class, 'bar'))->getValue(new Foo)); var_dump((new ReflectionMethod(Foo::class, 'taz'))->invoke(new Foo));

preferences:
22.43 ms | 404 KiB | 5 Q