Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Shift an element off the beginning of array
<?php array_shift(array &$array): mixed
<?php             return;

        }



        $task = array_shift($tasks);

        $promise = call_user_func($task);

        assert($promise instanceof PromiseInterface);

        $pending = $promise;
<?php             return;

        }



        $task = array_shift($tasks);

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

        assert($promise instanceof PromiseInterface);

        $pending = $promise;