pass classname as string parameter php 7.4 code example Example 1: php get class name of this get_class($this); Example 2: php get object class get_class($object);