Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an object
<?php is_object(mixed $value): bool
<?php         return $promiseOrValue;

    }



    if (\is_object($promiseOrValue) && \method_exists($promiseOrValue, 'then')) {

        $canceller = null;



        if (\method_exists($promiseOrValue, 'cancel')) {
<?php {

    if (\is_array($callback)) {

        $callbackReflection = new \ReflectionMethod($callback[0], $callback[1]);

    } elseif (\is_object($callback) && !$callback instanceof \Closure) {

        $callbackReflection = new \ReflectionMethod($callback, '__invoke');

    } else {

        $callbackReflection = new \ReflectionFunction($callback);
<?php     public function enqueue($cancellable): void

    {

        if (!\is_object($cancellable) || !\method_exists($cancellable, 'then') || !\method_exists($cancellable, 'cancel')) {

            return;

        }
<?php         if (\is_array($callback)) {

            $ref = new \ReflectionMethod($callback[0], $callback[1]);

        } elseif (\is_object($callback) && !$callback instanceof \Closure) {

            $ref = new \ReflectionMethod($callback, '__invoke');

        } else {

            $ref = new \ReflectionFunction($callback);