Well that looks better from cli. I'm starting to understand this feature.
I figured I'd try to fix IGBINARY handling anyway, thinking it would be faster.
Now I do not receive any errors when calling hmset($key, $array) with subsequent hgetall($key) ... However, from redis-cli:
1) "66080317"
2) "\x00\x00\x00\x02\x11\bSomedata"
3) "66081310"
4) "\x00\x00\x00\x02\x11\x1eLonger Data Here"
5) "3632156"
6) "\x00\x00\x00\x02\x11\otherdata"
Rats, my data is still (when viewed in redis-cli) prepended with binary control characters? It looks like at least 4 additional characters per value are stored -- the serialization info obviously. I thought that once I fixed igbinary serializer I wouldn't have this problem but I guess that's part of the tradeoff.
It seems odd to me that the serializer is called at all on scalar string hash values.
Anyway, on to a few questions:
Is this the expected output? Meaning, if I use a serializer with PHPRedis, I'm stuck with extra control characters in all my hash values?
Should I use Redis::SERIALIZER_NONE for simple string/value pairs, and SERIALIZER_IGBINARY with nested arrays, objects, and binary data? Meaning, I need to type check the argument before using hmset on it and switch the serializer?
Or should I just ignore these extra control characters?
This seems like some added overhead I wasn't planning on having to deal with. I am kind of used to being able to tweak certain things via redis-cli but if my hashes are always serialized in this fashion it makes that much harder, or I'll have to always work from PHP to use the correct serializer... do I have that figured correctly?
Thanks in advance for feedback.