1.) I had a couple questions on what the standard or "best practice" for
documenting a few things.

 

When I see something in the source code that is:

 

RETURN LONG(val);

 

But I notice that when I do gettype($val), it is actually an integer.
Maybe I'm missing something?  Does it return a long when it needs to be
a long and an integer when it can fit into an integer?  And if it's the
ladder, how should I document that?  Should I document it saying
"returns an integer" or "returns a long" or how else?

 

2.) At the bottom of all the XML sheets, it says
"sgml-default-dtd-file:../../../../manual.ced"... where is that file, or
if it has moved, where to?  If it has moved, should I also update all of
my files to reflect those changes?

 

3.) There are a few things that are compiled conditionally and I was
wondering about how to document them.  In the function with
posix_getpgid it says that it always returns false if the system doesn't
support it.  Is that true?  Because it looks as though it doesn't even
create a PHP function for it if it even exists:

 

#ifdef HAVE_GETPGID

PHP_FUNCTION(posix_getpgid)

{

      long val;

      if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &val) ==
FAILURE) {

            RETURN_FALSE;

      }

      

      if ((val = getpgid(val)) < 0) {

            POSIX_G(last_error) = errno;

            RETURN_FALSE;

      }

      RETURN_LONG(val);

}

#endif

 

I would assume that if you don't have it, then you don't even get the
PHP function, but maybe, once again, I'm missing something?

 

-Logan

Reply via email to