3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Kitchen { private $yummy = 'cake'; } $kitchen = new Kitchen(); (Closure::bind(function (Kitchen $kitchen) { $kitchen->yummy = 'pasta'; }, null, $kitchen))($kitchen); var_dump($kitchen);
based on BlUXn
Output for hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
object(Kitchen)#1 (1) { ["yummy":"Kitchen":private]=> string(5) "pasta" }
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/Al6fH on line 13
Process exited with code 255.