The syntax is: string get_class(object obj_name); <? class Vehicle { } class Land extends Vehicle { } $car = new Land; $class_a = get_class($car); print_r($class_a); ?>