From 35c69ad7fc8408389ad4b66b1aa334f66db47d93 Mon Sep 17 00:00:00 2001 From: Igor Strykhar Date: Wed, 20 Apr 2022 22:35:16 +0300 Subject: [PATCH] Readme verbose info --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index cc41b85..f085eea 100644 --- a/README.md +++ b/README.md @@ -824,6 +824,26 @@ $db->verbose(); ``` +Verbose to file|steam: + +```php + // init client + $cli = new Client($config); + $cli->verbose(); + // temp stream + $stream = fopen('php://memory', 'r+'); + // set stream to curl + $cli->transport()->setStdErrOut($stream); + // exec curl + $st=$cli->select('SElect 1 as ppp'); + $st->rows(); + // rewind + fseek($stream,0,SEEK_SET); + + // output + echo stream_get_contents($stream); +``` + ### Dev & PHPUnit Test