In the write function for a session save handler $data is passed in a format like this:
test|a:1:{s:3:"foo";s:3:"bar";}session|a:2:{s:10:"isLoggedIn";b:1;s:8:"clientId";s:5:"12345 ";}
Is there a way to convert that into the proper array which would be:
array
(
'test' => array
(
'foo' => 'bar'
)
'session' => array
(
'isLoggedIn' => true
'clientId' => '12345'
)
)
I tried passing that into unserialize but I get an error of:
unserialize() [function.unserialize]: Error at offset 0 of 95 bytes
and it just return false.