Skip to content

Invalid serialization for floating numbers #290

@abhishek6262

Description

@abhishek6262

There is a minor difference in the serialization done at the PHP and Javascript polyfill.

PHP will serialize 750.0 as d:750;
Whereas, Javascript implementation for the same will serialize it as i:750;

This happens due to the internal working of Javascript and PHP. But is there a way, we can handle this? We have a very specific use case of generating an md5 hashed key from the serialized value but due to this minor difference, the hashed value is completely different for both PHP and Javascript.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions