PHP Interview Questions

On this page I will compile a list of questions which a person should know to handle a PHP interview. These are based on my personal experience.

PHP is gaining ground and number of jobs are also rising. In fact most of the companies are struggling to find good PHP candidates. In my view PHP is one of the easiest language on the EARTH, but its easiness has become its main weakness. Often people do not take it seriously, they just practice few things and go ahead with facing interviews. When companies are looking for a specific fields they need a person with good all round knowledge of the language.

Keeping this in mind I am compiling a list of normal items and questions which a person who is aspiring to be a good PHP developer should know.

  • Why PHP is suitable for web development?
  • Can we do other type of development in PHP?
  • if cookies are disabled in a browser, session will work or not? If Not, why? and if yes, do we need to something specific in php configuration?
  • What are the main different between mysql_fetch_row and mysql_fetch_array functions?
  • What is the fourth parameter of mysql_connect function and what is the use of this?
  • How you normally handled page permissions?
  • What is different between hashing and encryption?
  • Can I retrieve my password from a site which store password in md5 format?
  • What are the security issues if we enable super globals in our php.ini file?
  • What the major issues you have faced while working with GD library? (This question validate candidate’s real experience)
  • What is the difference between explode and split?
  • Which PHP Framework you have used mostly?
  • What is the use of “global” identifier?
  • What the magic functions in PHP?
  • Does PHP 4 have any magic functions?
  • How can I send  http referer information in my curl request?
  • How can I send attachment with my email?
  • How can we work with different language in PHP?

(Few questions are tricky questions and really don’t have any answers)

Leave a Reply