From 4ebc114042e41b502d8fe609abe685b23903ccd2 Mon Sep 17 00:00:00 2001 From: Julian Calaby Date: Mon, 4 Jun 2018 21:49:24 +1000 Subject: [PATCH] Update example to output a single line on PHP 7.2 Somewhere in the development leading up to PHP 7.2, var_dump() started outputting the file and line number as part of it's output. This causes one of the end-to-end tests to fail as the example script it uses outputs twice as many lines as expected. This fixes this by using var_export() and a little wrapping to output useful debug data if something goes wrong and sensible output otherwise. --- examples/generating_integers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/generating_integers.php b/examples/generating_integers.php index f3a612f8..b155840e 100644 --- a/examples/generating_integers.php +++ b/examples/generating_integers.php @@ -7,5 +7,5 @@ $eris ->forAll(Generator\int()) ->then(function ($integer) { - var_dump($integer); + echo var_export($integer, true) . PHP_EOL; });