PHP - Interview Questions and Answers for freshers pdf

1. What is PHP?
2. What Is a Session?
3. What is meant by PEAR in php?
4. How can we know the number of days between two given dates using PHP?
5. How can we repair a MySQL table?
6. What is the difference between $message and $$message?
7. What Is a Persistent Cookie?
8. What does a special set of tags do in PHP?
9. How do you define a constant?
10. What is meant by urlencode and urldecode?
11. How To Get the Uploaded File Information in the Receiving Script?
12. What is the difference between mysql_fetch_object and mysql_fetch_array?
13. How can I execute a PHP script using command line?
14. What are the different tables present in MySQL? 

15. How To Create a Table?
16. How can we encrypt the username and password using PHP?
17. How do you pass a variable by value?
18. When are you supposed to use endif to end the conditional statement?
19. How can we send mail using JavaScript?
20. What is the functionality of the function strstr and stristr?
21. What is the difference between ereg_replace() and eregi_replace()?
22. How do I find out the number of parameters passed into function9. ?
23. Write a select query that will be displayed the duplicated site name and how many times it is duplicated? …
24. How To Protect Special Characters in Query String?
25. Are objects passed by value or by reference?
26. What are the differences between DROP a table and TRUNCATE a table?
27. What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods?
28. WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
29. What’s the special meaning of __sleep and __wakeup?
30. How can we submit a form without a submit button?
31. Would you initialize your strings with single quotes or double quotes?
32. What is the difference between the functions unlink and unset?
33. How come the code works, but doesn’t for two-dimensional array of mine?
34. How can we register the variables into a session?
35. What is the difference between characters \023 and \x23?
36. How can we submit form without a submit button?
37. How can we create a database using PHP and mysql?
38. How many ways we can retrieve the date in result set of mysql using php?
39. What’s the output of the ucwords function in this example?
40. What’s the difference between htmlentities() and htmlspecialchars()?
41. What are the different functions in sorting an array?
42. How can we know the count/number of elements of an array?
43. How many ways we can pass the variable through the navigation between the pages?
44. What is the maximum length of a table name, a database name, or a field name in MySQL?
45. How many values can the SET function of MySQL take?
46. What are the other commands to know the structure of a table using MySQL commands except EXPLAIN command?
47. What’s the difference between md5(), crc32() and sha1() crypto on PHP?
48. How can we find the number of rows in a result set using PHP?
49. How many ways we can we find the current date using MySQL?
50. Give the syntax of GRANT commands?
51. What is the value for this auto incremented field user_pri_id?
52. What is the difference between CHAR and VARCHAR data types?
53. How can we encrypt and decrypt a data present in a mysql table using mysql?
54. Will comparison of string "10" and integer 11 work in PHP?
55. What is the functionality of MD5 function in PHP?
56. How can I load data from a text file into a table?
57. How can we know the number of days between two given dates using MySQL?
58. How can we change the name of a column of a table?
59. How can we change the data type of a column of a table?
60. What is the difference between GROUP BY and ORDER BY in SQL?
61. What is meant by MIME?
62. How can we know that a session is started or not?
63. What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
64. What are the MySQL database files stored in system ?
65. What is the difference between PHP4 and PHP5?
66. Can we use include(abc.PHP) two times in a PHP page makeit.PHP”?
67. What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
68. What is meant by nl2br()?
69. How can we encrypt and decrypt a data presented in a table using MySQL?
70. How can I retrieve values from one database server and store them in other database server using PHP?
71. IN HOW MANY WAYS WE CAN RETRIEVE DATA IN THE RESULT SET OF MYSQL USING PHP?
72. What are the functions for IMAP?
73. What are encryption functions in PHP?
74. What is the difference between htmlentities() and htmlspecialchars()?
75. What is the functionality of the function htmlentities?
76. How can we get the properties (size, type, width, height) of an image using php image functions?
77. How can we increase the execution time of a php script?
78. HOW CAN WE TAKE A BACKUP OF A MYSQL TABLE AND HOW CAN WE RESTORE IT?
79. WHAT TYPES OF IMAGES THAT PHP SUPPORTS?
80. How can I know that a variable is a number or not using a JavaScript?
81. How can we submit from without a submit button?
82. How many ways can we get the value of current session id?
83. How can we destroy the cookie?
84. What are the current versions of Apache, PHP, and MySQL?
85. What are the features and advantages of OBJECT ORIENTED PROGRAMMING?
86. What is the use of friend function?
87. How can we get second of the current time using date function?
88. What is the maximum size of a file that can be uploaded using PHP and how can we change this?
89. What are the advantages of stored procedures, triggers, indexes?
90. What is maximum size of a database in mysql?
91. Explain normalization concept?
92. What type of inheritance that php supports?
93. How can increase the performance of MySQL select query?
94. How can we change the name of a column of a table?
95. What are the different ways to login to a remote server? Explain the means, advantages and disadvantages?
96. How can I use the COM components in php?
97. How many ways we can give the output to a browser?
98. What is the default session time in php and how can I change it?
99. What is the difference between Reply-to and Return-path in the headers of a mail function?
100. How To Turn On the Session Support?
101. Explain the ternary conditional operator in PHP?
102. What’s the difference between include and require?
103. How many ways can we get the value of current session id?
104. How can we destroy the cookie?
105. How To Read the Entire File into a Single String?

0 comments: