Re: Static vs. Instantiated Objects in PHP
| From: | Richard Lynch | Date: | Fri, 21 Apr 2006 00:40:56 +0000 |
| Subject: | Re: Static vs. Instantiated Objects in PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234439@lists.php.net to get a copy of this message | ||
On Thu, April 20, 2006 7:15 pm, Mark Baldwin wrote:
> What?!? Why the need to make faces? Seems like a legitimate question
> to ask what goes on behind the scenes when you program a certain way.
Because your analysis (deleted for brevity) is rather shallow.
Perhaps static objects create an instance, but cache it, but only for
a certain amount of time to save on RAM.
Or not.
I don't know, nor care, nor should you.
All you REALLY should care about is:
1. Maintainability.
2. Reliability.
3. Performance.
All of which can (probably) best be analyzed by ignoring the "behind
the scenes" and benchmarking and writing good tests -- tests on your
hardware, with your software, specifically geared to your application
needs.
"Knowing" what PHP/Zend is doing behind the scenes is likely to be, at
best, an incomplete and mis-construed view-point.
I trust this clarifies why, imho, your post was a Bad Question and
would be better answered by your trying out the two possible paradigms
and testing them for YOUR needs.
YMMV NAIAA IANAL
--
Like Music?
http://l-i-e.com/artists.htm