Re: Experience/Function Aliases (Was:Re: [PHP-DEV] PHP File Upload Security Hole - Still No Fix?
| From: | Zak Greant | Date: | Thu, 07 Sep 2000 04:09:24 +0000 |
| Subject: | Re: Experience/Function Aliases (Was:Re: [PHP-DEV] PHP File Upload Security Hole - Still No Fix? | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-32482@lists.php.net to get a copy of this message | ||
> One good idea I saw (that you might want to submit as a
feature request)
> is a way to make a function 'alias' instance for the life
of a script. That way,
> you could call your standard header at the beginning of a
script, and
> use quick coding for the rest of the script. You can
currently do this
> by writing your own functions, but it seems like this
could come in
> handy for _everyone_, regardless of the functions they
used most
> frequently (with less coding than a function). It wouldn't
expand the
> neccesary documentation load, could be rolled into any
forward version,
> etc, and might(?) fit quite well into the pre-parsing
already done by the
> Zend code.
>
> 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 &');
- Zak