Top 10 PHP Expert Tips

Post on 21-Feb-2017

48 views 0 download

Transcript of Top 10 PHP Expert Tips

TOP 10 PHP EXPERT TIPS

INTRODUCTION HOW TO BE AN EXPERT IN PHPCONCLUSIONS

INTRODUCTION PHP is a server-side scripting language designed primarily for web development but also used as a

general-purpose programming language.

GO OOPEntering the realm of object oriented programming sets you at an advantage and ensures you are ahead of the pack.

TRASH ANYTHING THAT ENDS WITH _ONCE()Just don’t be in a hurry to use them because they kill your server resources. Include_once () and require_once () tends to be extremely hard on server resources.

KEEP EVER REPORTING ONWhat every PHP programmer should be starting on a new project is to turn error reporting to E_ALL. Nothing feels better than running a project in full production mode without getting even one error.

PROTECT YOUR DATABASE The best and safest way is to use mysql_real_escape_string() for all database before it is added to the database. This function makes all strings safe in terms of quotes and other functions.

USE PHP’S INBUILT FUNCTIONSPHP has many built-in functions that can do what you need them to, so check out the manual to make sure you are doing it in the best way possible.USE POST NOT GETGET is simple to emulate, but POST is safer.

DRAW BEFORE YOU CODEWireframe your projects, even if you are just scribbling a few notes on a piece of paper.UNDERSTAND YOUR PROJECTYou cannot code a project that you do not fully understand. If you do not understand exactly what it needs to do, and how it needs to it, you cannot build it.

POLISH YOUR BASICS Revise your basics and execute them more efficiently.

CODE, CODE AND CODEYou cannot become a good developer by reading. The one and only tried and trusted method, is to actually write code.

CONCLUSIONIf you are a PHP developer, follow these 10 important PHP tips to develop a good PHP program.

Presented By: ARISTA INFOTECH