Created
June 1, 2018 09:16
-
-
Save zGrav/84403f2b958e8d9cead34d4a98e6aa3f to your computer and use it in GitHub Desktop.
log php to console
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 debugToConsole($msg) { | |
echo "<script>console.log(".json_encode($msg).")</script>"; | |
} | |
debugToConsole('bla'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment