<?php trait T { function f() { return new self; } } class C { use T; } $c = new C; var_dump($c->f());
You have javascript disabled. You will not be able to edit any code.