Most of my program functions use the first approach
I have what ever must be given because the nature of the functions only
exists because it does certain things.
I then have the last argurment passed be an array. This will contain all
the data that I might want to use inside the function other
>What is the best way to pass the arguments so it is easy to maintain in
>future if function behaviour changes by adding/removing one or more
>arguments?
>
>Currently i am passing arguments in array. But i think it is not the
>clean way to do it and another approach i am using is functionName(arg1,
Hello,
If you are worried about this issue your best option is to switch to an
object oriented approach.
all the best
Hardik Doshi wrote:
Hi Group,
I have a question on overloaded function.
What is the best way to pass the arguments so it is
easy to maintain in future if function behaviour
c
expanding on this...
function func($arga, $argb, $argc='') {
do_something_with_arga($arga);
do_another_thing_with_argb($argb);
if ($argc != '') do_somthing_with_argc($argc);
}
on 1/18/02 1:19 PM, Ben Sinclair at [EMAIL PROTECTED] wrote:
> You can do something like this:
>
> function m
You can do something like this:
function myFunction($a = "hello", $b = "world") { }
Both arguments are optional and have default values. This is in the
documentation.
--
Ben Sinclair
[EMAIL PROTECTED]
- Original Message -
From: "Malte Fucks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
S
5 matches
Mail list logo