Jump to content

What I should know about PHP


Recommended Posts



I'm just wondering what I should know in PHP to be classed of a good PHP coder. I am wanting to compile a list so I can check off what I know and figure out what I still need to learn.



Link to comment
Share on other sites

* 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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Hey, thanks for the answers. Some things I am going to brush up on and ensure I can fully utilise and understand.


Silkfire, if you can come up with some more I would be very greatful.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.