Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php console log

// A little correction / improvement to @Kaotik's answer:
<?php
	function consoleLog($msg)
	{
		echo '<script type="text/javascript">console.log('
          . str_replace('<', 'x3C', json_encode($msg))
          . ');</script>';
	}

	consoleLog('Hello, console!');
?>
 
PREVIOUS NEXT
Tagged: #php #console #log
ADD COMMENT
Topic
Name
1+8 =