Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns the name of the class of an object
<?php get_class(object $object = ?): string
<?php         function (mixed $throwable) use (&$rejected, &$rejectedThrowable, &$fiber): void {

            if (!$throwable instanceof \Throwable) {

                $throwable = new \UnexpectedValueException(

                    'Promise rejected with unexpected value of type ' . (is_object($throwable) ? get_class($throwable) : gettype($throwable))

                );

            }
<?php         if (!$promise instanceof PromiseInterface) {

            $next = null;

            $deferred->reject(new \UnexpectedValueException(

                'Expected coroutine to yield ' . PromiseInterface::class . ', but got ' . (is_object($promise) ? get_class($promise) : gettype($promise))

            ));

            return;

        }