Supported Versions: PHP 5, PHP 7, PHP 8
Return the parent classes of the given class
<?php class_parents(object|string $object_or_class, bool $autoload = true): array|false
<?php             $parents = [$class];

            $hasDebugInfo = method_exists($class, '__debugInfo');



            foreach (class_parents($class) as $p) {

                $parents[] = $p;

                ++$i;

            }