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

From: Date: Wed, 10 Feb 2010 11:22:15 +0000
Subject: How far do/should we go in documenting defaults in the prototype?
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969381332@lists.php.net to get a copy of this message
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? This is related to bug http://bugs.php.net/bug.php?id=50983 Regards, Richard. -- ----- 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

« previous php.doc (#969381332) next »