DEV Community

Discussion on: My beloved PHP cheat sheet

Collapse
 
ellisgl profile image
Ellis

I need to benchmark it again, but ++$i is a micro optimizion you can use on your for loops. IIRC, do..while is another micro optimization you replace your while loops with, if you can guarantee at least one iteration.