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