Hi, Please accept my apologies in advance if this is not the correct place for this request.
This may exist, but I haven't been able to find it, and I think it would be REALLY helpful and convenient. The idea is this: When you write a script and call a function: <?php $whatever = previously_uncalled_function("one","two"); ?> PHP could automatically look for a file named "previously_uncalled_function" in your /include/functions/ (or whatever) directory. This would eliminate a LOT of include() and require() calls (or at least make them automatic) in a script. The function would only get read in if it was used. Functions could still be explicitly included or required as they currently are. I *think* the overhead would be about the same as the initial include() or require() call would have been. This would be very convenient. When you create a new function you drop it in that directory (with a very specific, unique name, of course), and it can immediately be called anywhere in the site. And, you only incur the disk IO to read it when its used for the first time in a script. The 3 things I want to avoid are: 1) Explicitly including every function, every time it's needed. 2) Disk IO of including a function when it's not needed. 3) Taking the easy route and including a file with a bunch of functions when most won't get called. Does this already exist, or is this a good idea (if not, any reasons why)? I personally would love to see it implemented if it isn't already. One possibility for implementation is just prior to the "undeclared function" error message, try to auto include the function prior to generating the error message. Thanks, Brian Allen [EMAIL PROTECTED] -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php