Tagged: php scripts

42 Tips for optimizing your php code

42 Tips for optimizing your php code

1. If a method can be static, declare it static. Speed improvement is by a factor of 4. 2. echo is faster than print. 3. Use echo’s multiple parameters instead of string concatenation. 4. Set the maxvalue for your for-loops before and not in the...