Powiel możliwe:
Print array to a fileZapisuj dane wyjściowe print_r w pliku txt. PHP
Jak mogę napisać ouput (na przykład podczas korzystania z tablicy), w pliku ?, starałem się z tym:
...
print_r($this->show_status_redis_server());
$status_redis = ob_get_contents();
fwrite($file, $status_redis);
...