Class Type Hints
<? class Dog { public function do_drool( ) { echo "Sluuuuurp\n"; } } class Cat { } function drool(Dog $some_dog) { $some_dog->do_drool( ); } $poppy = new Dog( ); drool($poppy); $poppy = new Cat( ); drool($poppy); ?>