PHP code example of wyrihaximus / ticking-promise
1. Go to this page and download the library: Download wyrihaximus/ticking-promise 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/ */
wyrihaximus / ticking-promise example snippets
declare(strict_types=1);
use function WyriHaximus\React\futurePromise;
futurePromise()->then(static function (): void {
echo 'Done', PHP_EOL;
});
futurePromise()->then(static function (string $message): void {
echo $message, PHP_EOL;
}, 'Also done');