3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); ini_set('display_errors', 'On'); class Kitchen { private $value = 'cheese'; } $k = new Kitchen(); $m = function(){ echo 'called me. Value is ' . $this->value; } Closure::bind($m, null, $kitchen); $k->m();
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'Closure' (T_STRING) in /in/ES4ZR on line 20
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/ES4ZR on line 20
Process exited with code 255.