About long, int and the php unpack function – or “where is the sign”? [UPDATED]
UPDATE:
Thanks to Ilia for reviewing and commiting the patch.
I recently noticed bug #38770 from the php bugtracker. It describes that pack behaves different on different platforms.
The problem occures due to a byte-wise convert from int to long (C-Language).
A programmer would expect the following code to pack an 32 bit int.
print_r(unpack(“N”, …