RE: [PHP3] Support for allias in function
| From: | Mark Roedel | Date: | Thu, 29 Jul 1999 13:35:31 +0000 |
| Subject: | RE: [PHP3] Support for allias in function | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-2949@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Wico de Leeuw [mailto:wico@cnh.nl]
> Sent: Thursday, July 29, 1999 6:43 AM
> To: php4beta@lists.php.net
> Cc: php3@lists.php.net
> Subject: [PHP3] Support for allias in function
>
> Hiya...
>
> I wonder if allias could be added to functions/classes
>
> something like this:
>
> function a ($data) {
> echo $data;
> }
>
> function b ($data) {
> echo $data;
> }
>
> so this can be replaced with:
>
> function a alias b ($data) {
> echo $data;
> }
Perhaps I'm just a little slow, or I'm not reading this correctly. I'm sure
the request is simple enough from a technical standpoint, but I'm not sure I
understand why you'd want or need multiple ways to refer to the same
function or class. Seems like the result would be an above-average chance
of confusing code, with no real technical benefit.
Is there an advantage to using this approach over simply using a call to a()
every time you want $data echoed?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell