Re: How far do/should we go in documenting defaults in the prototype?
| From: | Richard Quadling | Date: | Wed, 10 Feb 2010 16:36:30 +0000 |
| Subject: | Re: How far do/should we go in documenting defaults in the prototype? | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969381334@lists.php.net to get a copy of this message | ||
On 10 February 2010 15:16, Christopher Jones
<christopher.jones@oracle.com> wrote:
>
>
> 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.
Go back to the days of no default values listed for the more complex defaults.
Fair enough.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling