1. Use PHP built-in functions as much as possible
2. Reduce the use of magical functions
3. Disable the error suppressor (@), we recommend that you use an exception.
4. Fair use of expressions
5. Pay attention to the memory overhead and unset out the large variables in time.
6. Avoid doing operations within the loop for example, for ($i =0; $i <count ($array), $i + +) {echo $i;}; Each for will count once.
7. Avoid intensive operations, PHP is not suitable for intensive operations.
8. Use single quotes as much as possible to define strings.
9. Be sure to use a single quoted string for the key value for example, $array [key] = 100; PHP will take key as a constant, first find out if there is a constant, and then the key as a string.
10. Reduce the operation of the file class, pay attention to close the file resources in time.
11. Reduce PHP Initiating network requests
12. Apply php extension, cache opcode
13. Optimize PHP performance with the Xhprof tool. Http://www.cnblogs.com/buexplain/p/4821619.html
PHP Performance Optimization