Let\'s say I have a byte-stream in which I know the location of a 64-bit value (a 64-bit nonce). The byte-order is Little-Endian. As PHP\'s integer data-type is limited to 3
This seems like a total hack, but it should do the job, assuming you have the BC Math functions that daemonmoi recommended:
$result = "0";
for ($i = strlen($serverChallenge) - 1; $i >= 0; $i--)
{
$result = bcmul($result, 256); // shift result
$nextByte = (string)(ord($serverChallenge[$i]));
$result = bcadd($result, $nextByte);
}