3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class StaticA { public function __set() { $this->email = "e@01art.de"; } function dosomething(){ $this->email = "e@01art.de"; $obj = new static; $obj->email = "e@01art.de"; $obj->classInfo(); } function classInfo(){ echo get_class(new static). "\n"; echo $selfemail; } } class StaticB extends StaticA { function test(){ //echo get_class(new self). "\n"; parent::classInfo(); } function doit(){ parent::dosomething(); } } $object = new StaticB(); $object->doit();
Output for 5.3.0 - 5.5.11
Fatal error: Method StaticA::__set() must take exactly 2 arguments in /in/79EbX on line 7
Process exited with code 255.