3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StaticA { public function setEmail($redirect) { $this->email = $redirect; } function returnthis(){ return $this; } function dosomething(){ echo "Unrsprüngliche Methode"; $obj = parent::returnthis(); echo $obj->email; } function classInfo(){ echo get_class(new static). "\n"; echo $this->email. "\n"; } } class StaticB extends StaticA { function test(){ //echo get_class(new self). "\n"; parent::classInfo(); } function doit(){ $this->dosomething(); //echo $this->email. "\n"; } function dosomething(){ echo "Neue Methode!"; $obj = parent::returnthis(); echo $obj->email; } } $object = new StaticB(); $object->setEmail("erno@01art.de"); $object->doit();

This is an error 404

There are `0` results


preferences:
154.69 ms | 1398 KiB | 7 Q