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