Sunday, December 14, 2008

10 Advanced PHP Tips To Improve Your Programming

PHP programming has climbed rapidly since its humble beginnings in 1995. Since then, PHP has become the most popular programming language for Web applications. Many popular websites are powered by PHP, and an overwhelming majority of scripts and Web projects are built with the popular language.

Because of PHP’s huge popularity, it has become almost impossible for Web developers not to have at least a working knowledge of PHP. This tutorial is aimed at people who are just past the beginning stages of learning PHP and are ready to roll up their sleeves and get their hands dirty with the language. Listed below are 10 excellent techniques that PHP developers should learn and use every time they program. These tips will speed up proficiency and make the code much more responsive, cleaner and more optimized for performance.

1. Use an SQL Injection Cheat Sheet
2. Know the Difference Between Comparison Operators
3. Shortcut the else
4. Drop those Brackets
5. Favour str_replace() over ereg_replace() and preg_replace()
6. Use Ternary Operators
7. Memcached
8. Use a Framework
9. Use the Suppression Operator Correctly
10. Use isset instead of strlen

Read More...

No comments: