+Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time.
+Profile your code. A profiler shows you, which parts of your code consumes how many time. The Xdebug debugger already contains a profiler. Profiling shows you the bottlenecks in overview
+mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%
+It’s better to use switch statements than multi if, else if, statements.
+Unset your variables to free memory, especially large arrays.
+Turn on apache’s mod_deflate
+Close your database connections when you’re done with them