PHP Interview Questions for Freshers and Experienced Candidates

Posted By SLA Consultants India - Digital Marketing Training Institute slaconsultantsindia on 2018-05-20 4:49 AM

PHP Interview Questions for Freshers and  Experienced Candidates

Description

  1. What is PHP?
  2. What’s the difference between unset() and unlink()
  3. What is the use of "echo" in php?
  4. How can you enable error reporting in PHP?
  5. How can we get the IP address of the client?
  6. What are Traits?
  7. Can you extend a Final defined class?
  8. Can the value of a constant change during the script’s execution?
  9. What's the difference between include and require?
  10. How to include a file to a php page?
  11. What is use of in_array() function in php ?
  12. What is the use of 'print' in php?
  13. Differences between GET and POST methods ?
  14. What are the __construct() and __destruct() methods in a PHP class
  15. How to declare an array in php?
  16. require_once(), require(), include().What is difference between them?
  17. What is use of count() function in php ?
  18. What's the difference between include and require?
  19. How we can get the number of elements in an array?
  20. What is the difference between Session and Cookie?
  21. The value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of the integers contained inside input?
  22. How to set cookies in PHP?
  23. How would you declare a function that receives one parameter name hello?
  24. Suppose you receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would you validate whether the field is empty? Print a message "The email cannot be empty" in this case.
  25. How to Retrieve a Cookie Value?
  26. What are the 3 scope levels available in PHP and how would you define them?
  27. What are getters and setters and why are they important?
  28. What does MVC stand for and what does each component do?
  29. What are SQL Injections, how do you prevent them and what are the best practices?
  30. Why would you use === instead of ==?
  31. What are PSRs? Choose 1 and briefly describe it.
  32. What PSR Standards do you follow? Why would you follow a PSR standard?
  33. Do you use Composer? If yes, what benefits have you found in it?
  34. What’s the difference between using mysql_ functions and PDO?
  35. Describe how inheritance works with PHP.
  36. Do you know what the PHP-FIG is? Describe it, describe the PSRs you know.
  37. What classes would you create to build a basic Twitter-style status system with OOP?
  38. What frameworks are you experienced in?
  39. What frameworks do you prefer? Why?
  40. Thoughts/experience with unit testing?
  41. How to create a session? How to set a value in session ? How to Remove data from a session?
  42. what types of loops exist in php?
  43. How to execute an sql query? How to fetch its result ?
  44. How to create a mysql connection?
  45. What is the use of explode() function ?
  46. Write a program using while loop
  47. How we can retrieve the data in the result set of MySQL using PHP?
  48. What is the difference between explode() and str_split() functions?
  49. What is the use of mysql_real_escape_string() function?
  50. What are the different errors in PHP?
  51. Distinguish between urlencode and urldecode?
  52. What is PEAR?
  53. How to create a text file in php?
  54. what is sql injection ?
  55. Define Object-Oriented Methodology
  56. How to create an array of a group of items inside an HTML form ?
  57. What is the use of "enctype" attribute in a html form?
  58. What is the importance of "action" attribute in a html form?
  59. What is the importance of "method" attribute in a html form?
  60. What is mean by an associative array?
  61. What is the difference between mysql_fetch_array() and mysql_fetch_assoc() ?
  62. what is the use of isset() in php?
  63. what is the use of rand() in php?
  64. Write down the code for save an uploaded file in php.
  65. How to find the length of a string?
  66. How to set a page as a home page in a php based site ?
  67. How stop the execution of a php script ?
  68. How to redirect a page in php?
  69. What is the use of header() function in php ?
  70. How to strip whitespace (or other characters) from the beginning and end of a string ?
  71. How do you define a constant?
  72. How to find the position of the first occurrence of a substring in a string?
  73. What is x+ mode in fopen() used for?
  74. What are the different types of errors in PHP ?
  75. What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
  76. How to get the value of current session id?
  77. How to delete a file from the system
  78. What is the use of the function htmlentities?
  79. What are the encryption techniques in PHP
  80. What is the difference between $var and $$var?
  81. What is the use of "ksort" in php?
  82. Difference between mysql_connect and mysql_pconnect?
  83. How to convert one date format into another in PHP ?
  84. How to find current date and time?
  85. How send email using php?
  86. How to optimize code & how to pass user supplied data to SQL to avoid injection.
  87. Using htmlspecialchars namespaces and short hand array styles []

Tags: php interviews question, php question for freshers, advanced php question

Ratings & Review

5 star(s) from 3 user(s)
Post Review
Uh oh! We couldn't find any review for this listing.

Browse by Category


Featured Blogs
LIST OF COLLEGES TEACHING MBBS -2

State Name and Address of Medical College/Medical Institution University Name Annual Intake...

Difference Between Enterprise SEO and Traditional SEO

Enterprise SEO Target short-tail key words: Short-tail key word is also termed as “head terms” that...

Deputy Registrar of Trade Marks and Geographical Indications - UPSC Exam

Post: Deputy Registrar of Trade Marks and Geographical Indications Vacancy...

Popular Blogs
What is SEM and How it can Drive Traffic to Your Website

Search Engine Marketing (SEM) is an effective way to grow your business in a competitive market. With so many...

Online options to learn:Its not Difficult as you think

Welcome to the place of career counselling blog with helpful articles relates to career,education,and...

Which is the best institute for Tally in Delhi?

Tally training is designed for those candidates that want to pursue a career in accounting and taxation...

Recently Added Blogs
Top Five Advantages of Outsource Web Development Services

In the modern era, the vital employee to make a venture effect is via online business. It's through an...

What is the difference between sentences and clause give the types of clauses with an example?

The Main Difference – Clause vs. Sentence Both the words stated as clause and sentence are known to be...

Best offline digital marketing institute

It is more crucial and mandatory to know how to select the best quality institute to learn digital marketing,...