On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote:
No there is not, because an included file *executes* at the time it is
included and is then done. Any memory-resident objects (function/class
definitions, variables, etc.) that it defies then exist until you make
them
un-exist (with unset() for variables or, well, you can't with
functions and
classes AFAIK).
Include files are libraries. They are not functions. What you're
looking for
is a function. Don't try to use include files as functions. Therein
lies
pain.
I have function definitions in included files all over the place. I do
that
so one file will not be too big to keep scrolling back and forth through
to develop and debug. These are mainly in conjunction with multi
phase self processing forms.
Variables I could guess would be overwritten,
but if I have a function fu defined in two different files that are
include
in, say, a loop and I want to call one function fu on one iteration from
one included file, then the next iteration I include the next file and
call fu that is a different version, which function would be executed on
the second iteration?
Thanks for the response, I think I will have to do some experimentation
with this one.
Jeff K
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php