Re: Re: Function Cache
| From: | Kristian Koehntopp | Date: | Sun, 10 Dec 2000 17:38:39 +0000 |
| Subject: | Re: Re: Function Cache | ||
| References: | 1 2 3 4 | Groups: | php.dev php.pear |
| Request: | Send a blank email to php-dev+get-40751@lists.php.net to get a copy of this message | ||
Sterling Hughes wrote:
> Basically what this functionality would allow is that you
> define a function that then catches as missed function calls.
> The autoload variable would also contain the name of the
> missing function, ie:
Does this actually define code, i.e. use up memory? This would
do, but my proposal was more along the lines to intercept the
error message ("undefined or unsupported function") and have a
user function provide a single instance of code for all possible
calls. Slower, I think, but more conservative on memory - a
design decision, either implementation would be valid.
> $wrap = new wrapper;
> $wrap->hello("woohooo!");
>
> would call the AUTOLOAD function with one argument (woohooo!)
> and the global variable $AUTOLOAD would contain "hello".
Ugly. The global $AUTOLOAD should be an arg to AUTOLOAD()
instead.
Kristian
--
Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel
Tel: +49 431 386 436 00, Fax: +49 431 386 435 99
Using PHP3? See our web development library at http://phplib.netuse.de/