Skip to content

Instantly share code, notes, and snippets.

@hitautodestruct
Created August 27, 2013 08:15
Show Gist options
  • Save hitautodestruct/6350961 to your computer and use it in GitHub Desktop.
Save hitautodestruct/6350961 to your computer and use it in GitHub Desktop.
Better implementation of a `var_dump` function for web debugging.
function console_log ( $output ) {
echo '<script>';
echo 'console.log('. json_encode( $output ) .');';
echo '</script>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment