get_debug_type

Supported Versions: PHP 8
Gets the type name of a variable in a way that is suitable for debugging
get_debug_type(mixed $value): string
        if ($a) {

            static 
$publicProperties = [];

            
$debugClass $debugClass ?? get_debug_type($obj);



            
$i 0;

            
$prefixedKeys = [];
        if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) {

            
$b = (array) $a[$xPrefix.'previous'];

            
$class get_debug_type($a[$xPrefix.'previous']);

            
self::traceUnshift($b[$xPrefix.'trace'], $class$b[$prefix.'file'], $b[$prefix.'line']);

            
$a[$trace] = new TraceStub($b[$xPrefix.'trace'], false0, -\count($a[$trace]->value));

        }
                } elseif (\is_bool($v)) {

                    
$signature .= $v 'true' 'false';

                } elseif (
\is_object($v)) {

                    
$signature .= 'new '.substr(strrchr('\\'.get_debug_type($v), '\\'), 1);

                } else {

                    
$signature .= $v;

                }
        $class $stub->class;



        if (
\PHP_VERSION_ID 80000 "\0" === ($class[15] ?? null) : str_contains($class"@anonymous\0")) {

            
$stub->class get_debug_type($obj);

        }

        if (isset(
$this->classInfo[$class])) {

            [
$i$parents$hasDebugInfo$fileInfo] = $this->classInfo[$class];
    public function getIterator()

    {

        if (!
\is_array($value $this->getValue())) {

            throw new 
\LogicException(sprintf('"%s" object holds non-iterable type "%s".'self::class, get_debug_type($value)));

        }



        yield from 
$value;