[wp-hackers] echo and return
lowmagnet
lowmagnet at lowmag.net
Tue Jul 27 15:46:00 UTC 2004
On Wed, Jul 28, 2004 at 01:35:51AM +1000, Michael G wrote:
> The array style paramaters is used throughout most of the PEAR
> implementations (it's in their development guidelines I think). I
> believe it is a good way to do things and it really can't hurt to be
> consistent with PEAR. Might not hurt to have a look at what their
> guidelines actually say.
>
> Michael
PEAR apparently has nothing in its documentation that requires this type of array parameter, nor does it provide a method for doing so. As long as one remembers to keep the $defaults on the left-hand side of the array_merge, all should be ok.
If one wanted to pass the parameters on to a second function and set all formatting at the very top level, the parameters could be merged a second time within the function as well. Though at this point, OO would probably be better than recursion.
-eli
More information about the hackers
mailing list