get class from object php 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);