dalasweb
Well-Known Member
Дали да вервам на
http://www.webmastersucks.com/optimize-php-codes-tricks/
- Use echo, not print,
- Unset your variable when your job is over that variable, especially for large arrays,
- Don’t use require_once,
- Use full paths for includes,
- str_replace is faster than ereg_replace but strtr is fastest.. If you can, use strtr,
- Close your database connections when you are finish your process,
- Using $table['id'] is faster than $table[id],
- Use caching systems (memcache etc.)
http://www.webmastersucks.com/optimize-php-codes-tricks/