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