PHP's greatest strength is also its greatest weakness. Flexibility.
There are an infinite number of ways to perform the same task which PHP
will happily do without so much as a peep as to how poor the code
really is. Sadly, most developers endure a trial by fire where they
only learn from their mistakes after it's too late.
I suggest a more retro-active apprach. Studying, surrounding, and forcing yourself to abide by best-practice coding standards will yield surprising results in your applications despite the fact that it may seem like more work than it's worth.
I've come up with a list of things that I feel are most important to me when it comes to coding. So, without further adieu:


Bugs are an inevitable part of any development project that most
people loath or at least generally dislike. If you take the time to
examine this phase of a project you will find that it's not the bugs
that really irk you, but the way they are presented, described, and
handled.
I finally got around to installing xdebug on my development
environment and have decided it is the best thing since sliced bread.Installation was a breeze and the information it provides when something has gone wrong is incredibly helpful during debugging. What I didn't know, and hope to help others by documenting it here, was the amount of configuration options Xdebug has. The base install has some irritating limitations that are easily addressed with a few simple lines in the php.ini file. 