Created
March 27, 2019 17:57
-
-
Save rohjay/bb5d5c77ff5f4beb40cc4f5106eb6049 to your computer and use it in GitHub Desktop.
Var dump to the error log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function var_dump_to_error_log($data) { | |
ob_start(); | |
var_dump($data); | |
$error_log_this = ob_get_contents(); | |
ob_end_clean(); | |
error_log($error_log_this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment