Get long from buffer

@return int
433318
public function GetLong( )
		{
			if( $this->Remaining( ) < 4 )
			{
				throw new InvalidPacketException( 'Not enough data to unpack a long.', InvalidPacketException::BUFFER_EMPTY );
			}
			
			$Data = UnPack( 'l', $this->Get( 4 ) );
			
			return $Data[ 1 ];
		}
750716
protected function read()
    {
        $buffer = '';
        while (($line = fgets($this->_connection, 1000)) != null) { // intentionally ==
            $buffer .= $line;
            if (substr($line, 3, 1) === ' ') {
                break;
            }
        }
        return $buffer;
    }
1073433
public function getLength()
    {
        if (!$this->stub && !is_int($this->length)) {
            $this->length = strlen($this->data);
        }

        return $this->length;
    }
992409
public static function long(Buffer $buffer) : ?string
    {
        return is_array($hi = unpack('N', $buffer->read(4))) && is_array($lo = unpack('N', $buffer->read(4)))
            ? bcadd(bcmul(sprintf('%u', $hi[1]), '4294967296'), sprintf('%u', $lo[1]))
            : null
        ;
    }
751636
public function getLength()
    {
        if (!$this->container) {
            return 0;
        }

        $count = count($this->container);
        $keys = array_keys($this->container);
        return (array_keys($this->container) === range(0, $count - 1))
            ? $count
            : max($keys);
    }
1225230
public long toLong () {
    long result = 0;
    
    byte[] uuidBytes = super.toByteArray();
    
    for (int i = 0; i < 8; i++)
    {
      result = result << 8;
      result += (int) uuidBytes[i];
    }

    return result;
  }
1193535
public static final long getLong(InputStream is) throws IOException
   {
      byte[] data = new byte[8];
      is.read(data);
      return getLong(data, 0);
   }
263782
public synchronized long peekLong()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "peekLong");

      checkReleased();

      long result = 0;
      if (receivedBuffer != null)
      {
         int currentPosition = receivedBuffer.position();
         result = receivedBuffer.getLong();
         receivedBuffer.position(currentPosition);
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "peekLong", result);
      return result;
   }
1363828
public static long getLong(ByteBuffer buf, int index) {
        return buf.order() == BIG_ENDIAN ? getLongB(buf, index) : getLongL(buf, index);
    }
142862
public function Long()
    {
        if (!$this->value) {
            return null;
        }
        $formatter = $this->getFormatter(IntlDateFormatter::LONG);
        return $formatter->format($this->getTimestamp());
    }
675018
private function read()
    {
        $s = null;

        for (; !feof($this->sock);) {
            if (($line = fgets($this->sock, 1e3)) == null) {
                continue;
            }

            $s = explode(' ', $line)[0];

            if (preg_match('#^[0-9]+$#', $s)) {
                break;
            }
        }

        return (int) $s;
    }
590297
public function readByte()
    {
        if (($this->_needle + 1) > $this->_streamLength) {
            require_once 'Zend/Amf/Exception.php';
            throw new Zend_Amf_Exception('Buffer underrun at needle position: ' . $this->_needle . ' while requesting length: ' . $length);
        }

        return ord($this->_stream{$this->_needle++});
    }
884661
public function isTimedOut() {
		$age = $this->getAge();
		$timeout = $this->getMaxDuration();
		return $age && $timeout && ($age > $timeout);
	}
41628
public function readLongstr()
    {
        $this->_bitcount = $this->_bits = 0;
        $slen = $this->readPhpInt();
        if ($slen < 0) {
            throw new \Exception("Strings longer than supported on this platform");
        }
        return $this->_rawread($slen);
    }
165183
private function maxLength()
	{
		$max = mb_strlen($this->value);
		if (!$ret = $max <= $this->options->max) {
			$this->error(1);
		}

		return $ret;
	}
452936
protected function getValueLength()
    {
        if ($this->maxlength_ignored_characters != '') {
            $chars = preg_quote($this->maxlength_ignored_characters, '/');
            $pattern = sprintf('/[%s]/u', $chars);
            $value = preg_replace($pattern, '', $this->value);
            $length = mb_strlen($value);
        } else {
            $length = mb_strlen($this->value);
        }
        return $length;
    }
852093
public function getLength() {
		if($this->length !== null) {
			return $this->length;
		}

		$j = 0;

		foreach($this->components as $component) {
			$j += $component * $component;
		}
		return ($this->length = sqrt($j));
	}