interface Foo { function baz():T; } class Bar implements Foo { public function baz():T return null; // this is fine } function main() {}