Best practices makes your code less error, easier to maintain, and more secure….
- Don’t use the <? ?> short tag.
- Comment your code.
- Be consistent within your own code but recognize that other developers may have their own styles.
- If you are working on a project with other developers, use the style adopted by the project rather than your personal preference.
- Use extra lines to separate related blocks of code for improved readability.
- Be consistent with naming conventions and use meaningful names.
- Create the ending tag, bracket, or parenthesis when you create the beginning tag, bracket, or parenthesis.
- Leave error reporting on while developing and turn it off when your code goes into produc-tion. This enables you to locate errors, but protects the user from strange error messages.Error reporting is turned on through php.ini file.
Official Website : http://www.genwhizztech.com