Jump to Navigation

PHP Interview Questions


PHP Interview Questions

Interviews for IT jobs including PHP jobs often include challenges far beyond the usual questions regarding career aspirations.

IT interviews often consist of brainteasers, riddles and practical questions designed to measure your logic, reasoning, creative thinking, and problem-solving skills. The objective for the interviewer is not only to assess your technical knowledge, but also your communication skills and suitability (culturally) for the company.

Here are some example PHP job interview questions to help you to prepare yourself (answers can be found at the bottom of the page)

PHP Interview Questions

  1. What does a special set of tags <?= and ?> do in PHP?
  2. What’s the difference between include and require?
  3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
  4. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
  5. How do you define a constant?
  6. How do you pass a variable by value?
  7. Will comparison of string "10" and integer 11 work in PHP?
  8. When are you supposed to use endif to end the conditional statement?
  9. Explain the ternary conditional operator in PHP?
  10. How do I find out the number of parameters passed into function?

Click here to view answers.

It is important at PHP job interviews to be specific when answering questions. Concise qualitative answers demonstrate confidence and knowledge.

For more advice on perfecting your interview technique, we've partnered up with CV Knowhow who offer interview coaching so click here to find out more.

Good Luck!