Last active
November 6, 2015 13:06
-
-
Save wallacemaxters/73886a39b3f391a71055 to your computer and use it in GitHub Desktop.
An easy way to debug PHP in console of browser
This file contains 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
<?php | |
function console_log() | |
{ | |
foreach (func_get_args() as $mixed) { | |
printf('<script>console.log(%s)</script>', json_encode($mixed)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prints in browser console
{name: "Wallace"}