3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class sample{ public $sam = 'hello'; public function __get($varname){ echo 'you cant access '.$varname; } public function __set($varname){ echo 'there is no variable with name '.$varname; } } $s = new sample; echo $s->samp; $s->samfsdp = 'fasdf';
Output for 5.3.0 - 5.4.10
Fatal error: Method sample::__set() must take exactly 2 arguments in /in/p2AkM on line 9
Process exited with code 255.