Preferred method to store PHP arrays (json_encode vs serialize)

前端 未结 20 2219
孤独总比滥情好
孤独总比滥情好 2020-11-22 05:55

I need to store a multi-dimensional associative array of data in a flat file for caching purposes. I might occasionally come across the need to convert it to JSON for use in

20条回答
  •  眼角桃花
    2020-11-22 06:23

    just an fyi -- if you want to serialize your data to something easy to read and understand like JSON but with more compression and higher performance, you should check out messagepack.

提交回复
热议问题