<?php error_reporting(E_ALL & ~E_STRICT); class A { public function create() { return new static(); } } class B { public function meh() { return A::create(); } } $b = new B; echo get_class($b->meh()); // B ?
You have javascript disabled. You will not be able to edit any code.