Skip to content

Instantly share code, notes, and snippets.

@folmert
Last active August 29, 2015 14:21
Show Gist options
  • Save folmert/7905157838f16ca65ac8 to your computer and use it in GitHub Desktop.
Save folmert/7905157838f16ca65ac8 to your computer and use it in GitHub Desktop.
<?php
ob_start(); // start buffer capture
var_dump( $VARIABLE ); // dump the values
$VARIABLE_CONTENTS = ob_get_contents(); // put the buffer into a variable
ob_end_clean(); // end capture
error_log( $VARIABLE_CONTENTS ); // log contents of the result of var_dump( $object )
/*
add to php.ini
error_reporting = E_ALL & ~E_NOTICE
error_log = /errors.log
log_errors = On
and create in main dir errors.log
*/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment