RE: [PHP] Re: Object methods - memory usage?
| From: | John W. Holmes | Date: | Wed, 09 Oct 2002 22:51:41 +0000 |
| Subject: | RE: [PHP] Re: Object methods - memory usage? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119470@lists.php.net to get a copy of this message | ||
OK.
> -----Original Message-----
> From: Bogdan Stancescu [mailto:mgv@canad.ro]
> Sent: Wednesday, October 09, 2002 4:30 PM
> To: php-general@lists.php.net
> Subject: [PHP] Re: Object methods - memory usage?
>
> Well, I guess my questions are just too stupid to deserve an answer
> anyway. Sorry for spamming you guys with my retarded questions! I'll
> refrain from asking any more questions on this list in the future,
since
> I always seem to ask the wrong ones.
>
> Humbly yours,
> Bogdan
>
> Bogdan Stancescu wrote:
> > Hello!
> >
> > Ok, this is probably a very stupid question for someone who knows
how
> > these things work internally - but I don't, therefore I ask. :)
> >
> > When I instantiate an object, do the methods get instantiated as
well?
> > The question is asked memory-wise, not functionality-wise. More to
the
> > point, if I instantiate many identical objects with no class
variables
> > of their own but with many methods, will I get memory used up for
the
> > methods?
> >
> > If I were to guess, I'd say no extra memory is used for the methods
> > since I don't think you can dynamically redefine class methods, so
there
> > would be no reason for duplicating them instead of simply
referencing
> > the class definition - but then again, I don't know how PHP works
> > internally...
> >
> > Thank you!
> >
> > Bogdan
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php