Help us understand the problem. What is going on with this article?

PHP ログ出力調査

/tmp/dump.logに吐くようにする

$tar1 = '調査対象1';
$tar2 = '調査対象2';
$tar3 = '調査対象3';

ob_start();
var_dump( $tar1,$tar2,$tar3 );
$dump = ob_get_contents();
ob_end_clean();
file_put_contents( '/tmp/dump.log', $dump ,FILE_APPEND);
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away