Skip to content

Instantly share code, notes, and snippets.

@k-kurikuri
Created March 7, 2018 07:46
Show Gist options
  • Save k-kurikuri/5c739ca705dd27d2a3fe5c6547db5c67 to your computer and use it in GitHub Desktop.
Save k-kurikuri/5c739ca705dd27d2a3fe5c6547db5c67 to your computer and use it in GitHub Desktop.
PHPでvardump, print_rの結果をファイル出力する処理
ob_start();
print_r($var);
$out = ob_get_contents();
ob_end_clean();
file_put_contents('file', $out, FILE_APPEND);
@k-kurikuri
Copy link
Author

備忘録

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