On Fri, 13 Apr 2001, Hardy Merrill wrote:
>I found the same problem - when we upgraded to PHP4, function calls
>that used to work and NOT provide all the parameters, started failing.
>
>The way I fixed it was to give each parameter a default value *IN*
>the function definition, like:
>
>function abc($a='', $b='') // assigns null as parameter defaults
>
>that way, every parameter gets a value, even if all the parameters
>were not supplied in the call.
>
This works great (thanks for that :). However my question now is, what is
the general opinion about how to handle this.
Is it better to call functions giving all arguments values (even if its an
empty "" value) or is it fine to assign values from within the function as
described above ?
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]