Monday, 30 April 2012

10 Things Can Be Done to Become a Better PHP Programmer


PHP is most likely the top web development language now. At just least 20 million websites utilize PHP and its the language utilized on major websites including Wikipedia and additionally Facebook along with in a few of the world s biggest open source projects like WordPress and Drupal.

In this short article, I’ll share with you 10 things I wish I was actually told whenever I ended up being just getting started alongside PHP development, as well as I’m hoping you’ll grow to be able to learn a thing or 2 should you decide re just taking the initial methods into this awesome web development language.

1. Utilize PHP Core Functions and also Classes 

Should you decide re trying to do something which tends fairly common, possibilities are, there’s already a PHP function or class that you can take positive aspect of Constantly check out the PHP guide prior to creating your very own features. There’s basically no must create a function to eliminate the white area at just the starting at the end of a string whenever you can simply make use of the trim() function. Why build an XML parser for RSS feeds as soon as you may take advantage of PHP’s XML Parser features (including xml_parse_into_struct)?

2. Create a Configuration File 

Instead of having the database connection settings scattered everywhere, why not just create one excel at file which contains its settings, immediately after which consist of it in your PHP scripts? If you need to improve details down the line, can be done it in one file rather of many files. This might be furthermore worthwhile as soon as you need to utilize different constants and features through out several scripts.

0 comments:

Post a Comment

Thanks for your valuable comment.