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