Created
July 19, 2012 06:37
-
-
Save henare/3141164 to your computer and use it in GitHub Desktop.
Use output buffering to capture output from var_dump()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ob_start(); | |
var_dump($an_object_or_something); | |
$object_contents = ob_get_contents(); | |
ob_end_clean(); | |
echo ($object_contents); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment