About function reference [An idea for improvement]

From: Date: Sun, 01 Apr 2001 04:03:53 +0000
Subject: About function reference [An idea for improvement]
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969334872@lists.php.net to get a copy of this message
Hello forks, Currently function reference describes its usage as follows: int ereg (string pattern, string string [, array regs]) string ob_get_contents(void); ereg() changes value for 3rd parameters(pass by reference). ob_get_contents() returns reference to buffered contents. Once programmer understands how function works, it's not a problem. However it's unclear from current function description what happens to parameters and if programmer changes return value. How about put indication of reference if parameter/return value is a reference. For example, int ereg (string pattern, string string [, &array regs]) &string ob_get_contents(void); If I guess parameter/return value may be a reference, I'm making a little script to check what happen to parameter/return value. It'll be much easier to understand how functions is supposed to work if function description indicates whether parameter/return value is reference or not. Regards, -- Yasuo Ohgaki

« previous php.doc (#969334872) next »