Skip to content

Instantly share code, notes, and snippets.

@salcode salcode/functions.php Secret
Last active Aug 29, 2015

What would you like to do?
One-liner Troubleshooting with print_r()
# output $x (can be an object or array)
# to your page, nicely formatted
echo '<pre>';
print_r( $x );
echo '</pre>';
# record $x (can be an object or array)
# in your PHP error log
error_log( print_r( $x, true ));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.