php get type of object code example Example 1: php get type of object gettype($object); Example 2: find type in php gettype($u)