diff --git a/README.md b/README.md index 28e9006..5332fa4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,12 @@ built on top of [ReactPHP](https://reactphp.org/). Once [installed](#install), you can use the following code turn any blocking function (such as PHP's built-in [`file_get_contents()`](https://www.php.net/manual/en/function.file-get-contents.php) function) into a non-blocking one: ```php -$file_get_contents = (new Clue\React\Pq\Executor($loop))->fun('file_get_contents'); +fun('file_get_contents'); $file_get_contents(__FILE__)->then(function (string $contents) { echo $contents;