I just want to quickly store an array which I get from a remote API, so that i can mess around with it on a local host.
So:
If you don't need the dump file to be human-readable, you can just serialize() the array.
storing:
file_put_contents('yourfile.bin', serialize($array));
retrieving:
$array = unserialize(file_get_contents('yourfile.bin'));