msgpack / msgpack-php

msgpack.org[PHP]
BSD 3-Clause "New" or "Revised" License
773 stars 119 forks source link

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

Closed rasptux closed 4 years ago

rasptux commented 5 years ago

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