function CodedInputStream::readLittleEndian64
Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes, return false. Advance buffer with consumed bytes.
Parameters
$var:
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedInputStream.php, line 220
Class
Namespace
Google\Protobuf\InternalCode
public function readLittleEndian64(&$var) {
$data = null;
if (!$this->readRaw(4, $data)) {
return false;
}
$low = unpack('V', $data)[1];
if (!$this->readRaw(4, $data)) {
return false;
}
$high = unpack('V', $data)[1];
if (PHP_INT_SIZE == 4) {
$var = GPBUtil::combineInt32ToInt64($high, $low);
}
else {
$var = $high << 32 | $low;
}
return true;
}