public function parseEncodedBinary(&$s, &$p)
    {
        $f = ord(mb_orig_substr($s, $p, 1));
        ++$p;

        if ($f <= 250) {
            return $f;
        }

        if ($s === 251) {
            return null;
        }

        if ($s === 255) {
            return false;
        }

        if ($f === 252) {
            $o = $p;
            $p += 2;

            return $this->bytes2int(mb_orig_substr($s, $o, 2));
        }

        if ($f === 253) {
            $o = $p;
            $p += 3;

            return $this->bytes2int(mb_orig_substr($s, $o, 3));
        }

        $o = $p;
        $p = +8;

        return $this->bytes2int(mb_orig_substr($s, $o, 8));
    }
public function parseEncodedBinary(&$s, &$p)
    {
        $f = ord(mb_orig_substr($s, $p, 1));
        ++$p;

        if ($f <= 250) {
            return $f;
        }

        if ($s === 251) {
            return null;
        }

        if ($s === 255) {
            return false;
        }

        if ($f === 252) {
            $o = $p;
            $p += 2;

            return $this->bytes2int(mb_orig_substr($s, $o, 2));
        }

        if ($f === 253) {
            $o = $p;
            $p += 3;

            return $this->bytes2int(mb_orig_substr($s, $o, 3));
        }

        $o = $p;
        $p = +8;

        return $this->bytes2int(mb_orig_substr($s, $o, 8));
    }
public function parseEncodedBinary ( & $ s , & $ p ) { $ f = ord ( mb_orig_substr ( $ s , $ p , 1 ) ) ; ++ $ p ; if ( $ f <= 250 ) { return $ f ; } if ( $ s === 251 ) { return null ; } if ( $ s === 255 ) { return false ; } if ( $ f === 252 ) { $ o = $ p ; $ p += 2 ; return $ this -> bytes2int ( mb_orig_substr ( $ s , $ o , 2 ) ) ; } if ( $ f === 253 ) { $ o = $ p ; $ p += 3 ; return $ this -> bytes2int ( mb_orig_substr ( $ s , $ o , 3 ) ) ; } $ o = $ p ; $ p = + 8 ; return $ this -> bytes2int ( mb_orig_substr ( $ s , $ o , 8 ) ) ; }
Parses length-encoded binary
@param  string &$s Reference to source string
@param  integer &$p
@return integer     Result
Parses length - encoded binary