getStatus()
/**
* This method is used to get the status of the promise.
*/
public function getStatus(): string;This method allows you to take the status of a promise, check what condition they are in.
pending - The status shows that promises are waiting to be fulfilled in the event loop.
fulfilled - The state of affairs shows that the promise has been fulfilled.
rejected - The situation shows that a promise is rejected when an event occurs.Similarly we have functions like:
isPending()
isResolved()
isRejected()Last updated