original_string: protected static function _encodeSubIDs(\GMP ...$subids): string
      {
          $data = "";
          foreach ($subids as $subid) {
              // if number fits to one base 128 byte
              if ($subid < 128) {
                  $data .= chr(intval($subid));
              } else { // encode to multiple bytes
                  $bytes = [];
                  do {
                      array_unshift($bytes, 0x7f & gmp_intval($subid));
                      $subid >>= 7;
                  } while ($subid > 0);
                  // all bytes except last must have bit 8 set to one
                  foreach (array_splice($bytes, 0, -1) as $byte) {
                      $data .= chr(0x80 | $byte);
                  }
                  $data .= chr(reset($bytes));
              }
          }
          return $data;
      }
code: protected static function _encodeSubIDs(\GMP ...$subids): string
      {
          $data = "";
          foreach ($subids as $subid) {
              // if number fits to one base 128 byte
              if ($subid < 128) {
                  $data .= chr(intval($subid));
              } else { // encode to multiple bytes
                  $bytes = [];
                  do {
                      array_unshift($bytes, 0x7f & gmp_intval($subid));
                      $subid >>= 7;
                  } while ($subid > 0);
                  // all bytes except last must have bit 8 set to one
                  foreach (array_splice($bytes, 0, -1) as $byte) {
                      $data .= chr(0x80 | $byte);
                  }
                  $data .= chr(reset($bytes));
              }
          }
          return $data;
      }
code_tokens: protected static function _encodeSubIDs ( \ GMP ... $ subids ) : string { $ data = "" ; foreach ( $ subids as $ subid ) { // if number fits to one base 128 byte if ( $ subid < 128 ) { $ data .= chr ( intval ( $ subid ) ) ; } else { // encode to multiple bytes $ bytes = [ ] ; do { array_unshift ( $ bytes , 0x7f & gmp_intval ( $ subid ) ) ; $ subid >>= 7 ; } while ( $ subid > 0 ) ; // all bytes except last must have bit 8 set to one foreach ( array_splice ( $ bytes , 0 , - 1 ) as $ byte ) { $ data .= chr ( 0x80 | $ byte ) ; } $ data .= chr ( reset ( $ bytes ) ) ; } } return $ data ; }
docstring: Encode sub ID's to DER.
  
  @param \GMP ...$subids
  @return string
docstring_tokens: Encode sub ID s to DER .