PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I added a new file to our site that just prints out the memory used and before anything has happened memory_get_usage() says there is already 15MB in use. This only happens when I call it from a web browser. When I run the script from the command line, I get a much more reasonable 86KB.
You can set PHP up to automatically include() or require() files at the beginning of each request - might these be adding memory usage?
You can also call get_declared_classes() and get_defined_vars() to see if there's anything custom in there.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
get_defined_vars() and get_declared_classes() only returns an array of variable names and class names. The idea was, if you output get_declared_classes() and look through the list, you might see some user classes that aren't part of the PHP core. That would indicate they were being included somehow.
Other than that, I have no ideas.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.