function console_print($obj) { $js = json_encode($obj); print_r('<script>console.log('.$js.')</script>'); } function prettyPrint($a, $t='pre') {echo "<$t>".print_r($a,1)."</$t>";} // https://github.com/kint-php/kint consider using this
function console_print($obj) { $js = json_encode($obj); print_r('<script>console.log('.$js.')</script>'); } function prettyPrint($a, $t='pre') {echo "<$t>".print_r($a,1)."</$t>";} // https://github.com/kint-php/kint consider using this