3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Kitchen { private $yummy = 'cakesss'; } $sweetsThief = function (Kitchen $kitchen) { return $kitchen->yummy; }; $kitchen = new Kitchen(); $sweetsThief = Closure::bind($sweetsThief, null, $kitchen); var_dump($sweetsThief($kitchen));