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

Breadcrumb

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

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

CodedInputStream

Namespace

Google\Protobuf\Internal

Code

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;
}
RSS feed
Powered by Drupal