You are here: Re: [PHP] Global class instances mysteriously set to NULL « PHP « IT news, forums, messages
Re: [PHP] Global class instances mysteriously set to NULL

Posted by James on 10/13/47 11:05

> 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.)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация