Re: How far do/should we go in documenting defaults in the prototype?

From: Date: Wed, 10 Feb 2010 15:16:12 +0000
Subject: Re: How far do/should we go in documenting defaults in the prototype?
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969381333@lists.php.net to get a copy of this message
Richard Quadling wrote:
Hi. With substr_compare, the prototype should say ... int substr_compare ( string $main_str , string $str , int $offset [, int $length = max(strlen($str), strlen($main_str) - $offset) [, bool $case_insensitivity = false ]] ) which looks a little complex, even when styled appropriately. I think something like ... int substr_compare ( string $main_str , string $str , int $offset [, int $length = see below [, bool $case_insensitivity = false ]] ) and ... "The length of the comparison. The default value is the largest of the length of the str compared to the length of main_str less the offset. " for the $length parameter description may be easier. Ideas?
I think you don't even need to put "see below": int substr_compare ( string $main_str, string $str, int $offset [,
                   int $length [, bool $case_insensitivity = false ]] )
Chris
This is related to bug http://bugs.php.net/bug.php?id=50983 Regards, Richard.
-- Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ Free PHP Book: http://tinyurl.com/f8jad

« previous php.doc (#969381333) next »