From 0dee5ba6f95c56b0780e0fc863ee1c3fecd3a1c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Tue, 31 Mar 2015 15:59:26 +0200 Subject: [PATCH] [VarDumper] little optim --- components/var_dumper/advanced.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/var_dumper/advanced.rst b/components/var_dumper/advanced.rst index 99998826ab2..9a6a8b2675e 100644 --- a/components/var_dumper/advanced.rst +++ b/components/var_dumper/advanced.rst @@ -145,8 +145,7 @@ Another option for doing the same could be:: $output = fopen('php://memory', 'r+b'); $dumper->dump($cloner->cloneVar($variable), $output); - rewind($output); - $output = stream_get_contents($output); + $output = stream_get_contents($output, -1, 0); // $output is now populated with the dump representation of $variable