<?php class Foo { private $secretProperty = "Hello"; private function secretMethod() { return 'World'; } } $privatePropertyAccessor = function($prop) { return $this->$prop; }; $privateMethodAccessor = function($method) { return [$this, $method](); }; $foo = new Foo(); echo $privatePropertyAccessor->call($foo, 'secretProperty'); // Hello echo $privateMethodAccessor->call($foo, 'secretMethod'); // World
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`