From baf56b6eb5c4a8c92863c725d620cbf6732b48e1 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Mon, 9 Aug 2021 10:10:06 +0200 Subject: [PATCH] Add errer reporting in example and minor clean up --- README.md | 4 ++-- examples/12-slow-stream.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6dd3f4b..bda5d9b 100644 --- a/README.md +++ b/README.md @@ -513,7 +513,7 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP extensions and supports running on legacy PHP 5.4 through current PHP 7+ and HHVM. -It's *highly recommended to use PHP 7+* for this project. +It's *highly recommended to use the latest supported PHP version* for this project. ## Tests @@ -551,7 +551,7 @@ $ docker run -it --rm --net=host \ To run the test suite, go to the project root and run: ```bash -$ php vendor/bin/phpunit +$ vendor/bin/phpunit ``` ## License diff --git a/examples/12-slow-stream.php b/examples/12-slow-stream.php index 097ea97..8abd6eb 100644 --- a/examples/12-slow-stream.php +++ b/examples/12-slow-stream.php @@ -72,4 +72,6 @@ }); $connection->quit(); -}, 'printf'); +}, function (Exception $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; +});