Skip to content

Conversation

@michaelfeinbier
Copy link

When PHP serializes objects it detects recursions and marks them accordingly in the serialization (tokens r and R for recursion by reference) the references objects get an integer-based number to identify them later during the deserialization.

Example

O:8:"stdClass":1:{s:8:"subClass";R:1;}

This PR adds very basic support for those recursions. It is able to unserialize strings containing these recursions and will not throw an exception.
During the unserialization it acts similar to PHP's print_r() / var_dump() functions and will return a string like *RECURSION* reference #1 in the specific field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant