I am trying to read/write a one dimensional array into a file. Which is faster method to do this for read/replace?
- Serializing the array into the file, then loading it back again
- Using XML
- Using INI
Thank you
I am trying to read/write a one dimensional array into a file. Which is faster method to do this for read/replace?
Thank you
I think, it depends on the data types and how you use it.
There is one more method you haven't mentioned: JSON (if you don't have to save the data types, takes less space than serialized array).
This may help: Preferred method to store PHP arrays (json_encode vs serialize)