Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CodedOutputStream.php

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

CodedOutputStream

Namespace

Google\Protobuf\Internal

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal