This post will probably be changed and edited as I learn more. I'm currently working on a few projects that may run into issues as their usage scales. During development the sites run without hitch. No time outs - queries seem to run fast; basically no hiccups. However I know that I'm not coding the cleanest and most efficient way possible. Moving forward I would like to make optimization and resource management more of a priority. This post will be a way to track my progress and publish a best practice.
memory_get_usage() — Returns the amount of memory allocated to PHP. This number changes depending on the amount of variables being assigned, as well as any files or processing that may be stored in memory.