3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Kitchen { private $yummy = 'cake'; } $sweetsThief = & function (Kitchen $kitchen) { return & $kitchen->yummy; }; $kitchen = new Kitchen(); $sweetsThief = Closure::bind($sweetsThief, null, $kitchen); var_dump($sweetsThief($kitchen));
Output for 5.4.0 - 5.5.0
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/J2V41 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_FUNCTION in /in/J2V41 on line 8
Process exited with code 255.