Example of usage:
public static function getClassData($class)
{
// Trying to create a new object of ReflectionClass class
$class = new ReflectionClass($class);
$details = sprintf('%s - %s%s%s%s%s%s%s%s',
$class->getName(),
$class->isInternal() ? 'internal class,' : 'user-defined class,',
$class->isTrait() ? ' is trait,' : '',
$class->isInterface() ? ' is interface,' : '',
$class->isAbstract() ? ' is abstract,' : '',
$class->isFinal() ? ' is final,' : '',
$class->isCloneable() ? ' is cloneable,' : '',
$class->isInstantiable() ? ' is instantiable,' : '',
$class->isIterateable() ? ' is iterable : ''
);
return '<pre class="debug">' . rtrim($details, ',') . '</pre>';
}