PHP Interview Questions

Hello users, Today we are going to know few interview question on PHP, which may be useful to track your interview and get your dream job.

These PHP Questions have been designed based on my personal interviews which i was questioned.

These Questions are a mix of PHP, JQuery & API also are sutiable for freshers, 1 year, 2 years or more experienced people.So lets go ahead and take a look.

PHP

These questions include both Core PHP & Framework.

    1. Difference between OOPS & Procedural Programming Language.
    2. What is a constructor?
    3. What are magic methods?
    4. Is PHP Compiled or Interpreted?
    5. Final Keyword.
    6. Difference between Method overriding & overloading.
    7. What are variables variable.
    8. Difference between Single & double quotes.
    9. Difference between echo & print.
    10. Which is faster echo or print & why?
    11. What are the different types of arrays we have?
    12. Difference between Numeric & associative array.
    13. Mention 5 array functions & explain.
    14. Difference Between explode & implode.
    15. What is the function we use to exit from script?
    16. What is the function we use to delete a file or image using PHP?
    17. Difference between include & require.
    18. What is the function used to count total number of array elements?
    19. How do you declare constants in PHP?
    20. What are the different types of errors in PHP? Explain.
    21. Difference between SESSION & COOKIES.
    22. Can we use SESSION without COOKIES?
    23. Difference between PHP 5.6 & 7.
    24. What is the default controller in Codeigniter?
    25. What is .htaccess?
    26. What is MVC?
    27. How do you call constructor in Codeigniter?
    28. Do we use inheritance in Codeigniter?
    29. What is __constructor?
    30. What is $this?
    31. If i=0 print i=1 & if i=1 print i=0 without using if condition.
    32. Which is faster if OR switch?
    33. Routing in PHP?
    34. Difference between POST & GET

SQL

    1. What are indexes?
    2. How do you optimize query?
    3. Primary & unique key.
    4. Difference between truncate & drop.
    5. Different datatypes in MYSQL.
    6. Difference between CHAR & VARCHAR.
    7. What is SQL injection?
    8. Difference between LIMIT 10 & LIMIT 10 11?
    9. Find the second highest salary.
    10. How do you create indexes in MYSQL?
    11. What happens if i Set a column with varchar (50) and inputed 100 characters of data?
    12. Different types of JOINS.
    13. Difference between LEFT & RIGHT Join.
    14. Write a query to create a table.
    15. Write a query to JOIN two tables.
    16. How do you connect PHP with MYSQL?

API

    1. What is API?
    2. How do you authenticate API?
    3. How do you call an API?
    4. What are headers in API?
    5. What is Body in API?
    6. What is Postman?
    7. What are the different Request methods in API?
    8. What are POST,GET,PUT & DELETE in API?

Hope these questions help you crack your interview.All the best. If you like the article do share with your friends and colleagues which are looking for a job change.

For more updates:

Follow us on our Facebook page :
Facebook

Do Follow my Instagram page for more updates :
Instagram

 

 

Leave a Reply

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

The maximum upload file size: 2 MB. You can upload: image, document. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded.