php get class name from object code example
Example 1: php get class name of this
get_class($this);
Example 2: get class name from object php
// create an object
$bar = new foo();
// external call
echo "Its name is " , get_class($bar) , "\n";
Example 3: php get object class
get_class($object);