I wrote my first two programs for an IBM 1620 in binary -- the prof thought it would be 'instructive' to start with the 'basics'. We then progressed to 'Symbolic' (referred to today as 'assembly'). This was way back in 1963. However, I was so impressed with 'Symbolic' that, even today, I prefer coding at this level since you have your hands directly on the 'control knobs' of the machine, without the obfuscating layers created by the compiler designer(s). The point, for this thread, is that, back then, there were almost NO so-called 'coding standards' beyond those established within coding teams.
Through the years, I have been paid to code in almost 40 different 'languages' (separately counting the assembly language for each of the different computer systems for which I coded: IBM, Univac, Honeywell, Burroughs, Motorola, Intel, etc.). Looking back, I believe that my current PHP/HTML coding standards are based more on my (rather limited) use of C than on any other language. In this regard, my personal standards conform closely with those recommended by iceomnia (see, above). I wish to emphasize one, especially important, characteristic of the above examples: putting the opening '{' or '(' of control sub-structures on separate lines, aligned immediately below the 1st character of the respective function or conditional. Indeed, I even do this for 'else' conditionals:
if ($condition)
{
// if true
}
else
{
// if false
}
I realize that this is NOT the usual way (which is to leave these as the last character on the function/condition line), but, once you get accustomed to it, it sure facilitates rapid identification of logic boundaries.
One additional recommendation: to facilitate rapid identification of the closing '}' of a class/function, always add a comment indicating the form and name of that structure:
class foo
{
function constructor()
{
; // code
} // end function constructor
} // end class foo
Remember:
compared to you, a computer is a very fast, very accurate idiot; whereas,
compared to a computer, you are a very slow, very inaccurate genius.
Since the computer could not care less what 'coding standards' you choose, use those 'coding standards' that you, personally, find improve your accuracy. I submit that those same standards will, more likely than not, prove useful to others.
Of course, opinions are like, uh, noses -- (almost) everyone has one.