Clan Adverts

Php Talk · 30 Best Practices for PHP Beginners

Posted on Friday, August 14, 2009 @ 17:18 by admin

I came across this article today while browsing some of my favorite sites and if your trying to learn php this is worth the read.  I consider most of them best practices.

1. Befriend the PHP Manual

If you're new to PHP, then it's time to get acquainted with the awesomeness that is the PHP manual. The PHP manual is incredibly thorough and has truly helpful comments following each article. Before asking questions or trying to figure out an issue on your own, save some time and just head straight to the manual. Odds are the answer to your question is already nestled in a helpful article at the PHP.net site.

2. Turn on Error Reporting

Error reporting in PHP is very helpful. You'll find bugs in your code that you might not have spotted earlier, as not all bugs keep the application from working. There are different levels of strictness in the reporting that you can use, but E_ALL will show you the most errors, critical and warnings alike.

Once you've gotten your application ready for production, you'll want to turn off error reporting, or your visitors will see strange errors that they don't understand.

3. Try an IDE

IDE's (Integrated Development Environments) are helpful tools for any developer. While they're not for everyone, an IDE definitely has its place. IDE's provide tools like

  • syntax highlighting
  • code completion
  • error warnings
  • refactoring (reworking)

And many other features. There are plenty of great IDEs out there that support PHP.

Read the full article from net tuts+

 


Votes up: 6 / Votes down: 0
Random Products

Sorry, Comments are not available for this article.
 

Advertisement