<?php class Foo { protected $x = 3; public function test() { return function () { return $this->x; }; } } $foo = new Foo(); var_dump($foo->test());
You have javascript disabled. You will not be able to edit any code.