Re: [PHP] Re: Object methods - memory usage?
Bogdan Stancescu wrote: > Anyway, I don't expect this message to gain me a reply to my original > question - just wanted to explain myself for whoever has the curiosity > to find out why I reacted like that. There. There are many reasons why people do not reply. In my case it is sheer ignorance, I don't know the answer or anything that can help. You are asking questions about how the internals of php work, I imagine most on this list are users rather than php developers. Unless I had examined extensively the source code, I would not know the answers to what you ask. The php-dev list sounds the sort of place where most will have examined the source code, though whether it is a good idea to ask there I do not know. At least, being open source, it is possible to look at it yourself if you do not find anyone who does know. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Object methods - memory usage?
Heh, I should probably be mad at your reply - but I'm not, I'm objective enough to realize I could've replied the same way to a whining message like mine below. What I AM mad about is the reply of rest of the people on this list. And that's not because nobody replied to this question alone, but because this is the third (or so) question I ask on this list, and it's the third time I get no reply. And yes, I know I'm not paying for support so there's no guarantee for any, but c'mon, we're humans, you'd be annoyed as well if this happened to you, especially since there are few unanswered questions here. Anyway, I don't expect this message to gain me a reply to my original question - just wanted to explain myself for whoever has the curiosity to find out why I reacted like that. There. Bogdan John W. Holmes wrote: > OK. > > >>-Original Message- >>From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] >>Sent: Wednesday, October 09, 2002 4:30 PM >>To: [EMAIL PROTECTED] >>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 > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Object methods - memory usage?
OK. > -Original Message- > From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 09, 2002 4:30 PM > To: [EMAIL PROTECTED] > 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[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