I don't see any reason not to.
But you should allways try and make your varible names meaningful...

In some cases I do end up having the same, for example if I'm passing X,Y
coords around. But in othercases they have totally different names.

Also out of interest, activator=formal parameter, the other one is Actual
parameter (/me prays I got that the right way around :))

Andrew

----- Original Message -----
From: "Lennart Johansen" <[EMAIL PROTECTED]>
To: "PHP MailingList" <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 9:13 AM
Subject: [PHP] variables


> Is it advisable to use the same names for variables both in a function and
in
> its activator([?] I'm sorry I don't know the correct word) as follows?
>
> <?
> function test($var1, $var2) {
> ...whatever;
> return $result;
> }
>
> var $var1, $var2;
> $result = test($var1, $var2); // this is what I called the "activator" ...
:)
> ?>
>
> Lennart Johansen
>
>
> --
> 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]
>
>


-- 
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]

Reply via email to