aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/vendor/react/stream/examples/11-cat.php
diff options
context:
space:
mode:
Diffstat (limited to 'assets/php/vendor/react/stream/examples/11-cat.php')
-rwxr-xr-xassets/php/vendor/react/stream/examples/11-cat.php28
1 files changed, 0 insertions, 28 deletions
diff --git a/assets/php/vendor/react/stream/examples/11-cat.php b/assets/php/vendor/react/stream/examples/11-cat.php
deleted file mode 100755
index 90fadc0..0000000
--- a/assets/php/vendor/react/stream/examples/11-cat.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-// Simple example piping everything from STDIN to STDOUT.
-// This allows you to output everything you type on your keyboard or to redirect
-// the pipes to show contents of files and other streams.
-//
-// $ php examples/11-cat.php
-// $ php examples/11-cat.php < README.md
-// $ echo hello | php examples/11-cat.php
-
-use React\EventLoop\Factory;
-use React\Stream\ReadableResourceStream;
-use React\Stream\WritableResourceStream;
-
-require __DIR__ . '/../vendor/autoload.php';
-
-if (DIRECTORY_SEPARATOR === '\\') {
- fwrite(STDERR, 'Non-blocking console I/O not supported on Microsoft Windows' . PHP_EOL);
- exit(1);
-}
-
-$loop = Factory::create();
-
-$stdout = new WritableResourceStream(STDOUT, $loop);
-$stdin = new ReadableResourceStream(STDIN, $loop);
-$stdin->pipe($stdout);
-
-$loop->run();