code to log errors to web console
// Assuming you are wishing to log to the JS Console...
<?php
function consoleLog($msg) {
echo '<script type="text/javascript">' .
'console.log(' . $msg . ');</script>';
}
consoleLog('Hello, console!');
?>/*
console.log in php
*/
<?php
function consoleLog($message) {
echo '<script type="text/javascript">' .
'console.log(' . $message . ');</script>';
}
consoleLog('Hello, greppers!');
?>
Also in PHP:
- base64_decode($str header: location
- create laravel project specific version
- deactivate woocommerce breadcrumbs
- $this
- convert date time to timestamp php
- create a folder php
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; m ax key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`e mail`))
- check if key array exists php
- empty laravel cache
- buddy group hide notice join
- How to set a comment on table using Laravel Schema
- create a class in php
- Lumen framework promise
- display rounded price get_price php
- base encode64 php image
- array inverted php
- ErrorException without try catch
- debian php switch version
- date('N') php
- array push in php
- SQLSTATE[42S02] lumen
- check if string contains word php
- cacert file_get_contents openssl
- css adding corner