$data
print_r
/tmp/file.txt
$output = print_r($data, true); file_put_contents('/tmp/file.txt', $output);