Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks an assertion
<?php assert(mixed $assertion, Throwable|string|null $description = null): bool
<?php         };



        $promise = call_user_func($task);

        assert($promise instanceof PromiseInterface);

        $pending[$i] = $promise;



        $promise->then($taskCallback, $taskErrback);
<?php         $task = array_shift($tasks);

        $promise = call_user_func($task);

        assert($promise instanceof PromiseInterface);

        $pending = $promise;



        $promise->then($taskCallback, array($deferred, 'reject'));
<?php         $task = array_shift($tasks);

        $promise = call_user_func_array($task, func_get_args());

        assert($promise instanceof PromiseInterface);

        $pending = $promise;



        $promise->then($next, array($deferred, 'reject'));