Andi (and all), You are completely missing my point. I'm not looking for stateful storage of user variables. If a page creates an instance of the Person class and assigns it to $dave, then I expect $dave to go out of scope (and permanently disappear) at the end of the page request lifecycle--just like I expect a variable assigned inside a function to go out of scope when the function exits.
What I want the Zend engine to do is recognize that the Person class need not be loaded and parsed on every single page. The CLASS (not instances of) should be managed (i.e. loaded) only once per server. Therefore, static variables in the class would in fact be scoped at the classloader level. Then, all the pages that use Person class do not have to parse that class on every page request. This would be 1) a major performance boost, and 2) enable *real* use of static members (i.e. for proper implementation of the Singleton pattern). Am I being clear now? You know, it's really encouraging to see that the object syntax in PHP5 is so robust. But if I can't use the robust syntax to build robust applications, then what's the point? Consider this... there are lots of PHP developers who get started building relatively simple sites. Over time, those sites become more complex. At some point, the requirements of the project (customer) dictate more advanced technology. If you were to start including the features I've described, you could prolong the relevancy of PHP in these solutions. In other words, what's the growth path of PHP developers and PHP solutions as needs become more complex? Thanks, Dave --- Andi Gutmans <[EMAIL PROTECTED]> wrote: > At 10:13 AM 2/16/2004 -0800, Dave Peckham wrote: > >Hi all, > > > >My initial response to Jonathan has me thinking > more > >about this, and a higher level. I guess I want to > hear > >from the Zend guys about their intentions of PHP as > an > >app server. IMHO, that's the right direction. > > > >For example, when PHP is loaded by the web server, > >it's only loaded once, and it should keep track of > all > >the classes that get loaded, and only load them > once > >(unless the file changes, say). Static variables > >should apply to the server scope (classloader). The > >way it stands right now, if all the classes are > >essential unloaded after each request, then we're > >still really close to the CGI paradigm. If I have > >10,000 users who each use 10 pages per session, why > do > >I need to load the "Foo" class 100,000 times? > > > >Zend guys, what are your thoughts? Was this concept > >considered and rejected? Your thought process and > >direction are important to my technology choice. > > PHP is pretty much a stateless language. If you want > to keep a state you're > going to have to serialize/unserialize to your > harddisk or DB. There have > been attempts at creating something similar to an > app server such as srm > but they never really took off. In any case, "app > server" is quite a > general concept and I could argue that Apache & PHP > together are an App > Server. > > Anyway, if you really need to persist data/variables > across requests, there > are ways to do it (if it's per-Apache process it's > even easier) but not > quite as simple as leaving an object floating around > in main memory between > requests. > > Andi > __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php