Re: How can I do this -- method chaining

From: Date: Wed, 30 Jan 2008 15:50:06 +0000
Subject: Re: How can I do this -- method chaining
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-268327@lists.php.net to get a copy of this message
On Jan 30, 2008 10:46 AM, Stut <stuttle@gmail.com> 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? <Õ > �&Ÿˆ(¡UñXûk¸Š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. -nathan

« previous php.general (#268327) next »