Greetings,
I am trying to cut back on my memory usage and found a php function called (memory_get_usage), which I used and printed off on the footer of my page. I was experimenting on a large page with something like this:
Well, I started with var = 1 and I deleted everything (section 2 code block) inside the brackets for var = 2. It turns out that memory_get_usage() showed that a lot of memory was cut from usage when I did this. If I put section 2 back in, the memory goes back up, even though the script SHOULD, as far as I know, ignore everything inside the brackets! I would like the server to just ignore everything in the brackets that I'm not using.PHP Code:if (var == 1) {
//section 1 code...
}
else if (var == 2) {
//section 2 code...
}
else {
//section 3 code...
}
So I was wondering if someone could please explain this and what I can do to cut back on memory in this case.
Thanks



Reply With Quote




Bookmarks