Re: AUTOLOAD in PHP

From: Date: Fri, 22 Mar 2002 10:40:08 +0000
Subject: Re: AUTOLOAD in PHP
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-81615@lists.php.net to get a copy of this message
S.Murali Krishna wrote:
Hi, As I told in my Previous Post that I have added a feauture in PHP which is similar to AUTOLOAD feauture in Perl Modules. I had sent a unified diff output along with this. According to that if a user tried to call a undefined function, PHP Zend Engine would search for a function named '__autoload' in current scope, if it finds one, it would set the global variable $php_undef_func_name with name of the called function and call the __autoload() function with passed arguments. Its working fine for me. If it seems to be good, we could discuss on this.
please have a look at the callback mechanism for unserialize() ( http://php.net/unserialize ) and try to follow the scheme already implemented for including files for undefined classes on demand -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77

« previous php.dev (#81615) next »