PHP code example of krakjoe / promises
1. Go to this page and download the library: Download krakjoe/promises library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
krakjoe / promises example snippets
$manager = new PromiseManager();
$promise =
new Promise($manager, new CalculateTheMeaningOfLife());
$promise
->then(
new AddTwo($promise))
->then(
new PrintMeaning($promise));
$manager->shutdown();