I get the below binary value in php by collecting the value from a DB.
0xF4010800000000960106000000002f03040000000063030700000000...
The problem is i don't know how to read it in sections.
For example, the first part F401 should be returned as a smallint (2 bytes) 500 and then just after that 08000000 should be returned as an int (4 bytes unsigned) and return as 8, how is this done in PHP?
EDIT:
I have tried hexdec(substr($value, 0, 4)) to try and get the value 500. bit on the first 4 bytes but this dosen't work, i don't know what else to try.
$hex = bin2ex($binary);and$dec = hex2dec($dec);