Last active
August 30, 2018 13:21
-
-
Save Juribiyan/5a79ee81ab86694913543cbea89db67c to your computer and use it in GitHub Desktop.
PHP console.log
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
function console_log() { | |
foreach(func_get_args() as $arg) { | |
$args []= json_encode($arg); | |
} | |
echo '<script>console.log('.join(', ', $args).')</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment