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