Top 50 Questions to prepare for PHP interview.

Shashikant Wagh
3 min readNov 28, 2021
Photo by Christina @ wocintechchat.com on Unsplash

This is a list I had prepared for one of my friend when he was applying for PHP developer jobs for 1+ years of experience, he had shared the list with couple of his friends who were in same process, and they told me after interviews that, they did not get asked single question outside this list.

I hope this list can help you in finding a job as a PHP developer.

To be clear this list is for people with one or two years of experience and not for PRO’s.

1. Tell me about yourself?
2. What is PHP?
3. What is the use of “echo” in php?
4. How to include a file to a php page?
5. What’s the difference between include and require?
6. require_once(), require(), include().What is difference between them?
7. What’s the difference between include and require?
8. Differences between GET and POST methods ? and tell me about “method” attribute in a html form?
9. How to create array in PHP ?
10. What is the use of ‘print’ in php?
11. What is session and how to create a session?
12. How to set a value in session ?
13. How to Remove data from a session?
14. what types of loops exist in php?
15. How to create a mysql connection?
16. How to execute an sql query? How to fetch its result ?
17. Write down the code to uploaded file in php.
18. How to strip whitespace (or other characters) from the beginning and end of a string ?
19. How to redirect a page in php?
20. How stop the execution of a php scrip ?
21. How to set a page as a home page in a php based site ?
22. How to find the length of a string?
23. Tell me 5 String fuctions.
24. Tell me 5 array function.
25. what is the use of isset() in php?
26. What is the importance of “action” attribute in a html form?
27. What is the use of “enctype” attribute in a html form?
28. What is OOP ( object oriented programming ) ?
29. How do you define a constant?
30. How send email using php?
31. How to get current date and time in PHP?
32. What are the encryption techniques in PHP?
33. What are the different types of errors in PHP ?
34. What is the difference between javascript and PHP?
35. What is CSS?
36. What is Ajax? Give me one example of ajax.
37. What is the difference between ID and class in CSS?
38. Why do we use multipart/form-data in html form?
39. What is jQuery?
40. What is MySQL?
41. What is JOIN in mysql? What are the different types of join?
42. How do we delete a row in a table?
43. What is difference between ‘Drop Table’ and ‘Truncate table’ ?
45. What are the method available in form submitting?
46. How to register session ?
47. What is use of header() function in php ?
48. What are number of ways you can print string in PHP ?
49. Why do we use MySQL?
50. What is the meaning of hypertext preprocessor?
51. How will you concatenate two strings in PHP ?
52. What is MVC?
53. What is the difference between Echo and Print in PHP ?
54. How to remove particular value from session in PHP ?
55. What are different types of arrays in PHP ?
55. How to create a function in PHP ?

Good luck with your job hunt and share your feedback.

--

--

Shashikant Wagh

A developer who had written code for last 10+ years and in love with JavaScript, You may found me @ https://www.linkedin.com/in/shashikant-s-wagh/