You are here: Re: Memory use « PHP « IT news, forums, messages
Re: Memory use

Posted by M. Sokolewicz on 03/24/05 10:29

Joe Wollard wrote:
> Greetings,
>
> I'm trying to help a C programmer understand and use PHP for web
> development. So far all the similarities between C++ and PHP are making
> the process rather speedy. He asked what seemed like a very simple
> question, but I couldn't find the answer. The questions is how can you
> determine how much memory a variable/object/struct/etc are using?
>
> For instance:
> $myObject = new myClass();
> $myObject->performAction_and_holdResult();
>
> At this point, how can you tell how much memory $myObject is using?
>
> Thanks!
you can't. PHP (the ZE actually) handles all memory related tasks behind
the screens, this means you shouldn't have to worry about it. But just
"don't worry" doesn't mean it can not be seen.
AFAIK there are functions which give you the total memory used by the
script, but I don't think there are any showing the memory used by a
structure/variable. (since there's no need for them)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация