I am trying to read the value from a Bitcoin transaction - https://en.bitcoin.it/wiki/Transaction
The wiki says it is an 8 byte integer, but nothing I have tried with unpack gives me the right value as a decimal.
I've been able to read everything else from the transaction except the values out the output - given the other fields I have managed to parse all line up with the correct values it appears I am reading the correct 8 bytes.
With:
$bin = hex2bin('00743ba40b000000');
$value = unpack('lvalue', $bin);
// 'value' => int -1539607552
and
$bin = hex2bin('d67e690000000000');
$value = unpack('lvalue', $bin);
// 'value' => int 6913750
That should be 500 and 0.0691375.
$datayou're working with here?