Compare serialize/unserialize PHP functions

Using 20000 element array as source data

Serialize save: 1.679 ms (1.46M)
Serialize read: 2.823 ms

JSON save: 1.839 ms (876.74K)
JSON read: 6.509 ms

PHP save: 8.612 ms (1.78M)
PHP read: 13.605 ms

Memcache set: 2.877 ms
Memcache get: 1.673 ms

IGBinary save: 1.657 ms (364.8K)
IGBinary read: 1.182 ms

MsgPack save: 2.446 ms (638.44K)
MsgPack read: 2.608 ms

[Use sample JSON] [View source]