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