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 'StdClass'; }; $k = $c->something
Output for 5.4.0 - 5.4.12
Parse error: syntax error, unexpected end of file in /in/9FsAW on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.22
Parse error: syntax error, unexpected $end in /in/9FsAW on line 16
Process exited with code 255.