1. Always use in development and in staging highest error reporting level, and display_errors ON:
error_reporting(-1); ini_set('display_errors', 1);
2. Fix every warning or notice that occur.
3. Check regularly server’s error_log for notices/warnings
4. Identify any temporary hack with a special mark. Maybe something like:
#@TODO masterpiece by @smartguy, to quick fix the division by zero
5. Each function must do a single task. If is log in the user and record the login in stats table, be nice and create a separate function for ‘record the login’ stuff.
Maybe even a distinct class for stats ?
6. Use a version control system. SVN is NOT dead.
8. Know your IDE: code snippets, code assist, integration with Zend Framework, SVN integration, bug tracker integration, and so on