original_string: private static function _encodePositiveInteger(\GMP $num): string
      {
          $bin = gmp_export($num, 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN);
          // if first bit is 1, prepend full zero byte
          // to represent positive two's complement
          if (ord($bin[0]) & 0x80) {
              $bin = chr(0x00) . $bin;
          }
          return $bin;
      }
code: private static function _encodePositiveInteger(\GMP $num): string
      {
          $bin = gmp_export($num, 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN);
          // if first bit is 1, prepend full zero byte
          // to represent positive two's complement
          if (ord($bin[0]) & 0x80) {
              $bin = chr(0x00) . $bin;
          }
          return $bin;
      }
code_tokens: private static function _encodePositiveInteger ( \ GMP $ num ) : string { $ bin = gmp_export ( $ num , 1 , GMP_MSW_FIRST | GMP_BIG_ENDIAN ) ; // if first bit is 1, prepend full zero byte // to represent positive two's complement if ( ord ( $ bin [ 0 ] ) & 0x80 ) { $ bin = chr ( 0x00 ) . $ bin ; } return $ bin ; }
docstring: Encode positive integer to DER content.
  
  @param \GMP $num
  @return string
docstring_tokens: Encode positive integer to DER content .