Created
August 13, 2022 09:03
-
-
Save zeropaper/dc83ddd16e89785b62d9bb56199900f1 to your computer and use it in GitHub Desktop.
instead of using dd()
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 dump_to_file(...$any) { | |
ob_start(); | |
var_dump(...$any); | |
file_put_contents('log.txt', ob_get_clean(), FILE_APPEND); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use
tail -f log.txt
for extra awesomesauce