code: private function convertFunction($token, $num_args)
      {
          $args = $this->functions[$token][1];
  
          // Fixed number of args eg. TIME($i, $j, $k).
          if ($args >= 0) {
              return pack('Cv', $this->ptg['ptgFuncV'], $this->functions[$token][0]);
          }
          // Variable number of args eg. SUM($i, $j, $k, ..).
          if ($args == -1) {
              return pack('CCv', $this->ptg['ptgFuncVarV'], $num_args, $this->functions[$token][0]);
          }
      }
docs: Convert a function to a ptgFunc or ptgFuncVarV depending on the number of
  args that it takes.
  
  @param string $token the name of the function for convertion to ptg value
  @param int $num_args the number of arguments the function receives
  
  @return string The packed ptg for the function