<?php interface Shiter { public function foo(Shiter $shit); } class Bbk implements Shiter { public function foo(Shiter $shit): Shiter { return new self(); } } $bbk = new Bbk(); $result = $bbk->foo(new Bbk()); var_dump($result);
You have javascript disabled. You will not be able to edit any code.