PHP code example of werkint / reactphp-stream
1. Go to this page and download the library: Download werkint/reactphp-stream 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/ */
werkint / reactphp-stream example snippets
$loop = React\EventLoop\Factory::create();
$source = new React\Stream\Stream(fopen('omg.txt', 'r'), $loop);
$dest = new React\Stream\Stream(fopen('wtf.txt', 'w'), $loop);
$source->pipe($dest);
$loop->run();