hook into terminal php code example Example: php print to console <script> console.log(<?= json_encode($foo); ?>); </script>