get_class php 7 code example Example 1: php get class name of this get_class($this); Example 2: php get object class get_class($object);