read($char, $prevChar); if (!is_null($arr)) { return $arr; } $prevChar = $char; } throw new Exception('Error during unserialization'); } }