Re: variables
| From: | Andrew Brampton | Date: | Mon, 10 Dec 2001 10:06:18 +0000 |
| Subject: | Re: variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77188@lists.php.net to get a copy of this message | ||
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" <tragicx@gmx.net>
To: "PHP MailingList" <php-general@lists.php.net>
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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>