0

I need to read a packet, little endian, long long(64 bit) this works fine:

echo unpack("V", $packet) . unpack("V", $packet);

but why this does not work?

echo unpack("V2", $packet);
iamart
  • 311
  • 3
  • 15
  • Your version of PHP has no 64 bit support http://stackoverflow.com/questions/864058/how-to-have-64-bit-integer-on-php – Max Sep 14 '12 at 20:31
  • @Max I tried echo PHP_INT_MAX; and it returned 9223372036854775807. Did I miss anything? – iamart Sep 16 '12 at 13:59

1 Answers1

0

Try

      echo unpack("V2", $packet, $packet >> 32);
Aalkhodiry
  • 2,178
  • 30
  • 25