Optimizing PHP

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.

Measuring Memory Usage

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.

PHP Page Time Load


  • Mysql_connections: open and close next to each other
  • Object destruction and Unset to free up variable space

You may also like...

Leave a Reply

Your email address will not be published.