<?php class Foo {} class Bar {} function takeObject(Object $obj) { var_dump(get_class($obj)); } takeObject(new Foo); takeObject(new Bar); takeObject('not an object');
You have javascript disabled. You will not be able to edit any code.