In case of "zero-length keys are not allowed, did you use $ with double quotes?" error, checking the saved data for objects with private/protected variables can solve the problem.
It seems, that the PECL extension currently does not support private/protected variables, thus making their keys empty strings. A simple, yet not allways desirable, solution is to make these variables public.
will throw an exception.
Will not throw an exception