And even if it did, it would never have remotely enough impact to justify hurting readability.
–
delnanFeb 6 '11 at 11:37

btw: With my files, I understand every $A-F0-9, $_0 $_1 .. $_9 $a $a0 $a1 .. $ff, so when if I ever reach 255/ff I will simply go and rewrite the whole file, as I have a max of 255 hex codes to remember I usually just read the hex as what I have it mapped to, Okay this did take a while to get used to though its now just a habit.
–
JamesM-SiteGenFeb 7 '11 at 6:38

I'm assuming that $var1 is meant to symbolize $aMeaningfulVariableName in this case.
–
MchlFeb 6 '11 at 12:03

@Dean : @Mchl Is correct, and $a is meant to be only for minimizing the code.
–
JamesM-SiteGenFeb 7 '11 at 6:24

1

@JamesM-SiteGen: Personally I think it is acceptable in one case only: if($conditionToBreakLoop) continue; or break;
–
MchlFeb 7 '11 at 9:27

1

That's what I'm saying. The difference is that 'break;' or 'contiunue;' are in fuct jump instructions, so there is no risk of somebody adding another instruction below and wondering why it's not being executed.
–
MchlFeb 8 '11 at 8:29

You should always code with legibility in mind. If a certain portion of code has performance issues, you optimize it as necessary. This may likely lead to less legible code. In which case you provide extra explanations in comments.

As far as formatting is concerned, it doesn't have an impact on performance. I avoid those bracketless if statements as they are fragile and somewhat obscure. Thus, making your code potentially easier to break and harder to understand.

Use formatting that is easy for humans to read. The Speed Optimization resources I've found suggest that compiling PHP will make it faster. Other resources suggest that the interpreter will cache the pages, and the cached pages will be optimized.

What this means is that it's not worth your time to do this manually. First, it makes the code unreadable, and second, the interpreter will do this for you, so all you'll accomplish is making the code unmaintainable.

Here is a Stack Overflow Question, PHP Source Code Whitespace, that suggests there are very minute speed gains. However, I don't think it's worth the tradeoff of readibility for very little gain.

I suggest that you instead focus on growing the product, adding more features, and focusing on your business goals. You'll reap more rewards by focusing on those goals instead of over-optimizing.