public function readLittleEndian($offset, $count, $force_bigendian = false)
    {
        $this->assertOffsetAndLength($offset, $count);
        $r = 0;

        if (ByteBuffer::isLittleEndian() && $force_bigendian == false) {
            for ($i = 0; $i < $count; $i++) {
                $r |= ord($this->_buffer[$offset + $i]) << $i * 8;
            }
        } else {
            for ($i = 0; $i < $count; $i++) {
                $r |= ord($this->_buffer[$offset + $count -1 - $i]) << $i * 8;
            }
        }

        return $r;
    }
public function readLittleEndian($offset, $count, $force_bigendian = false)
    {
        $this->assertOffsetAndLength($offset, $count);
        $r = 0;

        if (ByteBuffer::isLittleEndian() && $force_bigendian == false) {
            for ($i = 0; $i < $count; $i++) {
                $r |= ord($this->_buffer[$offset + $i]) << $i * 8;
            }
        } else {
            for ($i = 0; $i < $count; $i++) {
                $r |= ord($this->_buffer[$offset + $count -1 - $i]) << $i * 8;
            }
        }

        return $r;
    }
public function readLittleEndian ( $ offset , $ count , $ force_bigendian = false ) { $ this -> assertOffsetAndLength ( $ offset , $ count ) ; $ r = 0 ; if ( ByteBuffer :: isLittleEndian ( ) && $ force_bigendian == false ) { for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ r |= ord ( $ this -> _buffer [ $ offset + $ i ] ) << $ i * 8 ; } } else { for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ r |= ord ( $ this -> _buffer [ $ offset + $ count - 1 - $ i ] ) << $ i * 8 ; } } return $ r ; }
read little endian value from the buffer

@param $offset
@param $count acutal size
@return int
read little endian value from the buffer