89 PHP Web Developer Interview Questions

Posted by on Monday 20 Dec 2010

Hiring the right PHP web developer is an important task for a company looking to grow their web presence. If you’re in the process of trying to find the right PHP developer, or if you are a PHP web developer looking for a job, preparing the right interview questions can help you. A PHP developer typically works on the front end or back end processes of a web system. Though some web developers have some design skills, you are more likely to find a talented PHP developer who can develop great code, but not necessarily great designs. Our sample PHP developer interview questions are focused on finding a talented PHP developer.

If you’re looking for a job as a PHP web developer, reviewing these questions can help you prepare for the interview.

These are just example questions, you likely will not use them all in an interview, but they can be used to help understand the level of the developer you’re interviewing and whether or not he/she will be the right fit in your organization.

PHP Web Developer Interview Questions

We’ve organized the questions into several categories to help you prepare for the interview.

General Web Industry Questions

These questions are used to measure the candidate’s understanding of the web in general and give you an idea of how they keep up to date on industry trends.

  1. What do you do offline to learn about your work online?
  2. What industry blogs do you enjoy reading?
  3. Do you prefer working on a team or alone?
  4. How would you rate your level of expertise in a shell environment?
  5. Can you show me some of the code you have written in the past?
  6. What is your favorite programming language? Why?
  7. What web browser do you use?
  8. Do you have your own personal site? What is it? What’s the purpose of your site?
  9. Have you ever worked on an open source project? Was your code accepted into the project?
  10. What’s the largest website you’ve worked on? What specifically did you code on that site?
  11. How did you get into PHP?
  12. What is a cookie and what do you use it for?
  13. How does a cookie differ from a session variable?
  14. If you run into a problem while coding, how do you find a solution?
  15. What is XML? When do you use it?
  16. What is LAMP?
  17. Is PHP an old language? Should we be using .NET instead? Why? Why not?
  18. What is HipHop for PHP?
  19. What is the largest site on the Internet running on PHP?
  20. Outside of PHP, what web development areas do you believe you are most strong in?
  21. How do you connect to a remote Linux server?
  22. If your Apache web server is serving pages slowly, how would you troubleshoot the problem?

PHP Technical Questions

The bulk of your interview will be focused on these questions. These are the in-depth technical PHP questions you will use to identify the right candidate. Even if you are not proficient in PHP itself, you will learn a lot based on how well a candidate answers these questions.

  1. Have you ever used a PHP framework? What’s your favorite? What are the major differences between the major PHP frameworks?
  2. You’re receiving an error when uploading a file that the limit is set too low. Where would you change the setting to allow for larger file uploads?
  3. (Give the candidate some broken source code) Fix this code please.
  4. What features would you add to PHP if you could?
  5. What is the different between include and require?
  6. How and when would you use endif to end a conditional statement?
  7. Under what circumstances would you use === in a conditional statement?
  8. Explain what the ternary conditional operator is.
  9. What is an array?
  10. How would you combine two variables together into a new variable?
  11. When would you use Get versus Post? What are the major differences between the two?
  12. How would you access information sent via Post? Get?
  13. How do you encrypt data using PHP?
  14. Describe your experiences with web services.
  15. If I told you I needed data from a web service, would you prefer it in XML or JSON?
  16. In general terms, describe how you would extract data from a web service if it returns JSON?
  17. What is a regular expression? How do you use regular expressions in PHP development?
  18. How many times can you include a php file in another php file?
  19. How do you send email in PHP?
  20. How do you increase the maximum script execution time for PHP?
  21. How would you sort an array in PHP?
  22. What do we uses classes for in PHP? In what cases would you define a class?
  23. What’s the difference between echo and printf?
  24. How do you calculate the number of days between two dates in PHP?
  25. When I open up a web site you developed and its a blank white screen, what steps do you take to troubleshoot the problem?
  26. How would you redirect a page in PHP?
  27. What is ob_start(); used for? Why would you use it when developing web pages?
  28. How do you define a constant in PHP?
  29. How do you determine if a constant is defined in PHP?
  30. What is the difference between <? ?>  and <?php ?>?

HTML/CSS Questions

Though your candidate may only do PHP development, he/she still needs to understand HTML and CSS well enough to produce a good looking product.

  1. Are you comfortable coding HTML by hand?
  2. Can you write table-less code using CSS?
  3. If you are presenting an error message and want the text colored red, how would you achieve this?
  4. How would you hide content on a page? How would you show hidden content later?
  5. What does float left do? How would you clear a float?
  6. What browser is the most difficult to write good, clean code for? What are the major problems with this browser?
  7. What is an inline style? When would you use it?
  8. What width should you develop a web page for?
  9. What tools do you use to ensure your code passes w3c compliance?
  10. When you create an element, how do you create a name for it so you can target it using CSS or JavaScript?

JavaScript Questions

Many systems use a form of Ajax to make them work right and JavaScript is essential to any Ajax.  These questions will test the JavaScript knowledge of your candidate.

  1. Is JavaScript a programming language? Why/why not?
  2. Do you have experience with JavaScript frameworks? Which ones? Which one do you like the most? Why?
  3. How do you submit a form without user interaction?
  4. What is Ajax?
  5. Describe code you have written which uses Ajax. Why did you use Ajax? How did you implement it? Why did you write it with Ajax in mind?
  6. What is jQuery?
  7. How would you animate an object on the page?
  8. What is the DOM?
  9. What are two ways you could attach JavaScript to an element to be executed on click?
  10. When would you write JavaScript on a web page and when would you include it in an external file?

MySQL Questions

Most PHP systems which require a database rely on MySQL. These questions are focused on MySQL and databases.

  1. How would you fix a corrupt table in a database?
  2. What is a primary key?
  3. What is an inner join? Left join? Right join? How are they different?
  4. Write a simple query for me to query all of the columns in a particular table.
  5. You have two tables which are connected via a unique ID. Write a query which will query both tables based on that unique ID.
  6. You have a table with an unknown number of records. You want to delete half of the records. You don’t care which records are deleted. What’s the most efficient way to do it?
  7. How would you create a new table in MySQL?
  8. What is a stored procedure? When would you use a stored procedure? Have you ever written a stored procedure?
  9. What is the difference between GROUP BY and ORDER BY?
  10. What is UNIQUE used for?
  11. What is DISTINCT used for?
  12. What is a temporary table?
  13. How would you select data into a temporary table?
  14. How do you delete records in MySQL?
  15. What is an alias? What would you use it for?
  16. How do you encrypt data in MySQL?
  17. What is a table index? Why would you use it?

What Questions Would You Add?

There are a number of things we could have asked to find the right PHP web developer. What questions did we miss? What would you ask? What have you been asked? Answer in the comments below.

Ace the Job Interview - Tough Questions eBook

In today's job market, any advantage you can get is helpful. Over 200 of the toughest interview questions - with prep tips and sample answers - can be found in this ebook. $9.99 - instant download on Amazon. More Info

Category: Career and Jobs Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>