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; $c->something = function(){ var_dump("A"); return function(){ var_dump('StdClass')}; }; $k = $c->something; $k();
Output for 5.3.0 - 5.4.12
Parse error: syntax error, unexpected '}' in /in/Oldbk on line 13
Process exited with code 255.