note 33418 deleted from function.require by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:44:29 +0000 |
| Subject: | note 33418 deleted from function.require by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59815@lists.php.net to get a copy of this message | ||
Note Submitter: php-comment-25-june-2003@ryandesign.com
----
Contrary to the comment from "Satisfied PHP User" on 20-Jan-2003 at 12:07, and much to my
delight, I find that there is no problem with using (include|require)[_once] inside a function call
(even if that function is inside a class). Although the require call is inside a function, the
functions defined in the included file are available globally, which is exactly what I want.
I'm building a system similar to "Satisfied's" api_load() function (except that
the files I include will contain class definitions, and my "api_load()" function will also
make an instance of that class and call its methods). I am using PHP 4.3.2.