Re: Global class instances mysteriously set to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Most likely, somewhere along the way, one of your files is triggering some
condition which 'unsets' your variable.

That's what it looks like. I can't find anything in the documentation or on the 'Net that describes such a condition. That's why I originally posted the question.


Personally, I always structure my code so that there is only one place
where any given file will be require'd so I don't need require_once.

Out of long habit from other languages I'm used to simply listing all dependencies at the begining and letting the compiler sort things out.


I want the failure that "require" provides, but don't want to have to map out all these class file dependencies so laziness demanded "require_once". :-)

Still learning the quirks of PHP. Every language has them.

(Now C++... yikes! That's a very quirky language. Once you learn where the "Don't Do That" rule applies, it's fine. I'm NOT trying to start any stupid language flame fest. Just saying that language was the one that gave me the most heartburn to date.)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux