Skip to content

Instantly share code, notes, and snippets.

@mediaupstream
Created February 11, 2012 18:04
Show Gist options
  • Select an option

  • Save mediaupstream/1803346 to your computer and use it in GitHub Desktop.

Select an option

Save mediaupstream/1803346 to your computer and use it in GitHub Desktop.
php console.log to the JS console. very awkward :)
function consoleLog ( $d ){
if(is_array($d)) $d = json_encode($d);
echo "<script> console.log('". $d . "'); </script>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment