Skip to content

Instantly share code, notes, and snippets.

@vdite
Last active December 23, 2015 20:09
Show Gist options
  • Save vdite/6687208 to your computer and use it in GitHub Desktop.
Save vdite/6687208 to your computer and use it in GitHub Desktop.
This is how to var_dump to a file with php
<?php
/** Thanks to Pascal Landau
** https://plus.google.com/105523642741376989823/posts
**/
$handle = fopen("path/log.log","a");
fwrite($handle, var_export($array_or_object, true));
fclose($handle);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment