php current class name code example
Example 1: php get class name of this
get_class($this);
Example 2: laravel get class name
$myObject = $em->find(ContactRelation::class, $userId);
echo get_class($myObject);
// Some\Name\Space\Domain\Identity\ContactRelation