Php convert byte string to integer
1 answer
Instead, it should be used n
as a format string.
$str = "\x01\xBB";
unpack("n",$str);
Take a look here for more format options.
http://php.net/manual/en/function.pack.php
+4
source to share