<?php class Kitchen { private $yummy = 'cake'; } $sweetsThief = function (Kitchen $kitchen) { return $kitchen->yummy; }; $kitchen = new Kitchen(); var_dump($sweetsThief($kitchen));
You have javascript disabled. You will not be able to edit any code.