Antal Áron blogja


file cache cimke

Store cache in files in PHP

var_export vs serialize vs json_encode

Recently, I was in a situation, when I had to cache some data in PHP. It was not a big project, so I didn't wanted to use redis or any other heavy tool. I decided to store the data in file. Let's serialize! ... Or var_export! ... Or json_encode?! Hehh.

I had no time than, I chose var_export. But I decided to benchmark my choice.

More...