3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class CarlClass { private $bits = 'Manly Bloke bits'; } $carl = new CarlClass(); $rape = Closure::bind(function & CarlClass $carl) { return $carl->bits; }, null, $carl); $hisbits = & $rape($carl); $hisbits = 'Lady parts'; echo 'Carl\'s bits are ' . $rape($carl);
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'CarlClass' (T_STRING), expecting '(' in /in/1TGtk on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting '(' in /in/1TGtk on line 12
Process exited with code 255.