On Wednesday 02 January 2002 20:43, you wrote:
> What you need to do is simply set the variables before you include
> the script.
> When you include a script with include() or require(), they fall
> into the same namespace as the include() or require() function that
> called them.
I read that in the manual too, but I have never understoud how it 
really works. I use require_once in function and the files I include 
have many class and function definitions in it (I include them when I 
really need them to make things faster). So when I try to imagine how 
it works, I feel that it shouldn't.
Becuse if I put the files in place of the require_onces I would get a 
code like this:
function foo() {

        class foo2 {
                function foo2() {
        class foo3 { ... }
And it looks strange, but it works well, I use it frequently. Does 
anybody know why is this code works actually?

p.s. of course it's only a theoretical question. I don't have to 
understand really, but it's good to know what I rely on.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to