function GPBUtil::combineInt32ToInt64
2 calls to GPBUtil::combineInt32ToInt64()
- CodedInputStream::readLittleEndian64 in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedInputStream.php - Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes, return false. Advance buffer with consumed bytes.
- CodedInputStream::readVarint64 in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedInputStream.php - Read Uint64 into $var. Advance buffer with consumed bytes.
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ GPBUtil.php, line 410
Class
Namespace
Google\Protobuf\InternalCode
public static function combineInt32ToInt64($high, $low) {
$isNeg = $high < 0;
if ($isNeg) {
$high = ~$high;
$low = ~$low;
$low++;
if (!$low) {
$high = (int) ($high + 1);
}
}
$result = bcadd(bcmul($high, 4294967296), $low);
if ($low < 0) {
$result = bcadd($result, 4294967296);
}
if ($isNeg) {
$result = bcsub(0, $result);
}
return $result;
}