Priti's Technical Corner

December 14, 2009

Technical Quiz

Filed under: PHP — Tags: , — pritisolanki @ 7:59 am

Hello Readers,

Following are some questions from the technical quiz – rapid fire round.This quiz is handled in our organization and it was really interesting.So, thought of sharing it with my readers as well.

1. SRP is a password authenticated key agreement protocol – True

2. Section tag is a valid HTML tag – True

3. ord() in PHP is a function to order hte resultset – False

4. RPM is a linux package management tool – True

5. SELECt UNQIUE Fieldsname from Tablename will report error to mysql – True

6. HTTP status code 301 is defined for temporary redirect – False

7. PHP latest stable release is 5.3.1 – True

8. HTTP is a stateless protocol. – True

9. $testVar=”5drr”; echo (int) $testVar; will output error ? –  False.

Hope these questions must have given you some really good time.

December 8, 2009

PHP Interview Questions

Filed under: PHP — Tags: , , , , — pritisolanki @ 8:25 am

Question 1 : Which of the following functions send a cookie without encoding the cookie value
a. setCookie()
b. header()
c. setRawCookie()
d. headers_list()
Answer: c

Question 2 : Which of the following filtering tech prevents cross site scripting vulnerabilities
Answer 2:
a. Strip all occurrences of the string “script”
b. Strip all occurrences of the string “javascript”
c. Enable magic_quotes_gpc()
d. None of the above

Answer: d

Question 3: why must you call session_start() pripor to any output?
Answer 3:
a. Becasue it is easy to forget if not placed at the top
b. Because you can no longer access the session data store after there has been output
c. because session_start() set some http headers
d. because  calling session_start() casues the http headers to be sent

Answer : c

Question 4: Which of the following functions require an open file resource?
a. fgets()
b. fopen()
c. filemtime()
d. rewind()
e. reset()

Answer : a & d

Question 5: internally PHP handle date and time as
a. A “date aray” consisting of the year,month,day,hour,min and sec.
b. A unix timestamp representing the number of sec since the unix epoch
c. A ISO-8601 date entity
d. A unix timestamp consisting of the number of microseconds since the unix epoch

Answer : b

Blog at

%d bloggers like this: