Jump to content

What I should know about PHP


mikhl

Recommended Posts

* Know OOP

* Write clean, well-structured code with good documentation/commenting

* Know different ways of solving the same problem

* Avoiding common coding mistakes

* Prevent SQL injections and other vulnerabilities (sanitize user input, etc.)

* Always be open to new technologies and update your code accordingly (clean it from deprecated stuff)

 

Can come up more if you want :)

OOP - not just the syntax, but the methodology.  If you think that OOP is merely stuffing functions in a class definition, you're doing it wrong.

 

Form handling - sticky forms, how to handle check boxes and radio buttons, how to handle POST data in general, validation/sanitation.

 

Databases - queries, injection prevention, efficiency.

 

Data structures - learn to love arrays, as they're the base of PHP.

 

Script design/organization - well-formed PHP scripts follow a particular pattern.  Jumping in and out of HTML in the middle of a script is a symptom of doing it wrong.  Learn to use templates, learn to separate your concerns, learn the difference between GET and POST and when to use them.

 

File handling - IO, looping through a directory, uploads, etc.

Get good at reading code you didn't write.  You'll never escape having to deal with it, so the faster you can read it and understand it, the more effective of a programmer you'll become.  Plus, you'll pickup a few ideas from other people's code.

 

And good PHP coder's don't look to become good PHP coders.  They look to become good coders, and PHP just becomes a tool that they know how to use.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.