Re: Experience/Function Aliases (Was:Re: [PHP-DEV] PHP FileUpload Security Hole - Still No Fix?

From: Date: Thu, 07 Sep 2000 05:53:00 +0000
Subject: Re: Experience/Function Aliases (Was:Re: [PHP-DEV] PHP FileUpload Security Hole - Still No Fix?
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-32490@lists.php.net to get a copy of this message
Zak Greant wrote: > > Such as: > > myaliases.inc---- > > /* may need to put some special "flag" char in front > > * so they are picked up easily, such as ~, as in > "~htment()" > > */ > > alias (htmlentities, htment) > > alias (get_html_translation_table, ghtt) > > alias (quoted_printable_decode, qpd) > > :) Ah, the feature already (sort-of) exists: > > $htmlent = 'htmlentities'; > print $htmlent ('" should be converted to " & should be > converted to &'); Hm. A page filled with print statements? And what about aliasing: alias (print, pr); alias (echo, ec); // my most used function, one less char than print. An amusing recursion happens: $ec = 'echo'; $pr = 'print'; print $pr ("hello, world"); /* Heh. */ print $ec ("hello, world"); Even with two letter function aliases, it still adds 7 chars to typing every function (print $).... which doesn't really help to shorten function calling if you're trying to shorten a 9 char function (let alone a 4-5 char function) down.... -Bop -- Brought to you from iBop the iMac, a MacOS, Win95, Win98, LinuxPPC machine, which is currently in MacOS land. Your bopping may vary.

« previous php.dev (#32490) next »