Skip to content

Instantly share code, notes, and snippets.

@ardani
Created June 17, 2019 03:54
Show Gist options
  • Save ardani/722afda39ae6d9ad3b57cfd30d7b241d to your computer and use it in GitHub Desktop.
Save ardani/722afda39ae6d9ad3b57cfd30d7b241d to your computer and use it in GitHub Desktop.
<?php
use GuzzleHttp\Promise\Promise;
$promise = new Promise();
$promise->then(
// $onFulfilled
function ($value) {
echo 'The promise was fulfilled.';
},
// $onRejected
function ($reason) {
echo 'The promise was rejected.';
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment