Amp\Promise\first

functionfirst(Amp\Promise[]$promises):Amp\Promise

Returns a promise that succeeds when the first promise succeeds, and fails only if all promises fail.

Type Parameter Description Default Value
Amp\Promise[] $promises Array of only promises. none