# $object1 has the interface foo # $object2 has the interface bar and baz with ($object1) { with ($object2) { bar; foo(baz); } } #### $object2->bar; $object1->foo($object2->baz);