I am curious to know that should we optimize loops, conditional checks, setting variables and unsetting them after they are used in PHP?
Is the foreach loop better then the for loop?
When I make IF-ELSE condition? Is it better to use ELSE clause or eliminate it altogether?
Does functions come in to play when optimizing code? Is strstr
better than strspos
?
Does these stuff important when coding or is it just personal preference?
I hope this makes sense.