function CodedOutputStream::writeLittleEndian64ToArray
1 call to CodedOutputStream::writeLittleEndian64ToArray()
- CodedOutputStream::writeLittleEndian64 in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedOutputStream.php
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ CodedOutputStream.php, line 114
Class
Namespace
Google\Protobuf\InternalCode
private static function writeLittleEndian64ToArray($value, &$buffer) {
$high = 0;
$low = 0;
if (PHP_INT_SIZE == 4) {
GPBUtil::divideInt64ToInt32($value, $high, $low);
}
else {
$low = $value & 0xffffffff;
$high = $value >> 32 & 0xffffffff;
}
$buffer[0] = chr($low & 0xff);
$buffer[1] = chr($low >> 8 & 0xff);
$buffer[2] = chr($low >> 16 & 0xff);
$buffer[3] = chr($low >> 24 & 0xff);
$buffer[4] = chr($high & 0xff);
$buffer[5] = chr($high >> 8 & 0xff);
$buffer[6] = chr($high >> 16 & 0xff);
$buffer[7] = chr($high >> 24 & 0xff);
return 8;
}