class_parents

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                 $message = str_replace(self::UNDEFINED_METHOD, 'Call to undefined method ', $message);



                if (class_exists((string) $class) && (is_countable(class_parents($class)) ? count(class_parents($class)) : 0) > 0 && array_values(class_parents($class))[0] === TestCase::class) { // @phpstan-ignore-line

                    $message .= '. Did you forget to use the [uses()] function? Read more at: https://pestphp.com/docs/configuring-tests';

                }