public function test(T $t) { // have access to private, because of the same type $t->foo = 'hello'; $t->bar(); }