public function readInt16Signed()
    {

        // Read the data into a string
        $string = $this->read(2);

        // For big endian we need to reverse the bytes
        if ($this->number_type == self::NUMBER_TYPE_BIGENDIAN) {
            $string = strrev($string);
        }

        $int = unpack('sint', $string);

        unset($string);

        return $int['int'];
    }
public function readInt16Signed()
    {

        // Read the data into a string
        $string = $this->read(2);

        // For big endian we need to reverse the bytes
        if ($this->number_type == self::NUMBER_TYPE_BIGENDIAN) {
            $string = strrev($string);
        }

        $int = unpack('sint', $string);

        unset($string);

        return $int['int'];
    }
public function readInt16Signed ( ) { // Read the data into a string $ string = $ this -> read ( 2 ) ; // For big endian we need to reverse the bytes if ( $ this -> number_type == self :: NUMBER_TYPE_BIGENDIAN ) { $ string = strrev ( $ string ) ; } $ int = unpack ( 'sint' , $ string ) ; unset ( $ string ) ; return $ int [ 'int' ] ; }
Read a 16-bit signed integer

@return int
@throws \GameQ\Exception\Protocol
Read a 16 - bit signed integer