Created
April 8, 2016 13:57
-
-
Save nickolasburr/3c73e060e521627c362c0569d3cc936d to your computer and use it in GitHub Desktop.
Log PHP data structures in browser console
This file contains hidden or 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 | |
// log information to JS console | |
function consoleLog ($value) { | |
echo '<script>console.log(' . json_encode($value) . ')</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment