Re: Global class instances mysteriously set to NULL

From: Date: Mon, 10 Jan 2005 17:57:27 +0000
Subject: Re: Global class instances mysteriously set to NULL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-205986@lists.php.net to get a copy of this message
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.)

« previous php.general (#205986) next »