<?php class Foo { public static function create(){ $class = get_called_class(); return new $class; } public function bar(){ return 'Bin!'; } } var_dump( Foo::create()->bar() );
You have javascript disabled. You will not be able to edit any code.