Nathan Nobbe wrote:
On Jan 30, 2008 10:46 AM, Stut <stuttle@xxxxxxxxx
<mailto:stuttle@xxxxxxxxx>> wrote:
Nathan Nobbe wrote:
Actually no, I mean I would *just* use a static method. If there is no
reason to instantiate an object, why would you? <http://stut.net/>
you realize you are instantiating an class in the code you posted, right?
from you post:
$o = new Test();
if i didnt know any better, id call that an instantiation of the Test
class ;)
the only thing is you are forcing it out of scope by using a local variable
to store the reference to the object.
Seriously? You really need to read the emails you're replying to. I gave
an example that did what the OP asked for. Then I went on to say that I
would probably just use a static method. I never said I wasn't creating
an instance in the example I posted.
The "forcing it out of scope" was the crux of my point. However, if
Jochem is right then it's kinda pointless with the current
implementation of the GC, but may become relevant in the new GC.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php