3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Container { protected $s=array(); function __set($k, $c) { $this->s[$k]=$c; } function __get($k) { return $this->s[$k]($this); } } $c = new Container; $var = function(){ var_dump("A"); return function(){ var_dump('StdClass') }; }; Closure::bind($var, $c); $k = $c->something; $k();
Output for 5.3.0 - 5.4.12
Parse error: syntax error, unexpected '}' in /in/Fvh5C on line 13
Process exited with code 255.