PHP code example of razshare / react-php-yielder
1. Go to this page and download the library: Download razshare/react-php-yielder 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/ */
razshare / react-php-yielder example snippets
\Razshare\ReactPhp\Yielder\Yielder::run(function(){
$result = yield new \React\Promise\Promise(function($r){
$r("hello world");
});
echo $result.PHP_EOL;
});
bash
composer