The fastest way (performance-wise) to do that is to use ReflectionClass.
<?php
$obj_class_name = (new \ReflectionClass($obj))->getShortName();
?>
On this blog I describe solutions to IT-related problems… and also I vent my related hate here
The fastest way (performance-wise) to do that is to use ReflectionClass.
<?php
$obj_class_name = (new \ReflectionClass($obj))->getShortName();
?>