Skip to content

msgpack-php msgpack_serialize/msgpack_pack not handling properly large int #134

@rasptux

Description

@rasptux

Hello,

When running the following:

$s = msgpack_serialize(1547232962250769);
$data = msgpack_unserialize($s);
var_dump($data);

I got the following output:
int(1058637841)

It seems that 64bits ints are converted into 32 bits ints.

When unpacking/unserializing data received on a socket, 64bits ints are properly received.

My configuration is as follows:
PHP Version 7.2.7
OS = Windows 10
msgpack 2.0.3
Architecture : x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions