Skip to content

Instantly share code, notes, and snippets.

@zeropaper
Created August 13, 2022 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeropaper/dc83ddd16e89785b62d9bb56199900f1 to your computer and use it in GitHub Desktop.
Save zeropaper/dc83ddd16e89785b62d9bb56199900f1 to your computer and use it in GitHub Desktop.
instead of using dd()
<?php
function dump_to_file(...$any) {
ob_start();
var_dump(...$any);
file_put_contents('log.txt', ob_get_clean(), FILE_APPEND);
}
@zeropaper
Copy link
Author

use tail -f log.txt for extra awesomesauce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment