Skip to content

Commit

Permalink
Unserialize reimplemented (#412)
Browse files Browse the repository at this point in the history
* Unserialize re-implemented

- more strict and robust parser
- better PHP compatibility, especially in many edge cases
- basic reference support (r and R types)
- support for string with escape sequences (S type)
- support for infinity and nan values (d type)

* Fix whitespaces

* Fix code formatting

* If unserialized array has string keys, return object instead for backward compatibility

* Handle serialized multibyte utf-8 strings

* Fix unserialize example

* Rename cache to initCache for better readability

* Handle serialized multibyte utf-8 escaped strings

* Throw better error message when parsing strings fails
  • Loading branch information
kukawski authored Sep 28, 2020
1 parent 916f5b4 commit dd073d6
Show file tree
Hide file tree
Showing 2 changed files with 385 additions and 238 deletions.
Loading

0 comments on commit dd073d6

Please sign in to comment.