PHP 9

COEP
Lets Crack Online Exam

IT Interview Exam Paper: PHP 9

Subject: PHP 9

Part 9: List for questions and answers of PHP

 

Q1. How many predefined variables does PHP use to authenticate a user?

a) 1

b) 2

c) 3

d) 4

 

Q2. Which function is used to verify whether a variable contains a value?

a) header()

b) footer()

c) inset()

d) isset()

 

Q3. In which authentication method does changing the username or password can be done only by entering the code and making the manual adjustment.

a) Hard-coding a login pair directly into the script

b) File-based authentication

c) Data-based authentication

d) PEAR’S HTTP authentication

 

Q4. The authenticationFile.txt, the file which stores username and password should be stored ___ the server document root.

a) Inside

b) Outside

c) Within

d) None of the above

 

Q5. Which function is used to split a string into a series of substrings, with each string boundary is determined by a specific separator?

a) break()

b) divide()

c) explode()

d) md5()

 

Q6. Which is the most powerful authentication method among the four?

a) Hard-coding a login pair directly into the script

b) File-based authentication

c) Data-based authentication

d) PEAR’S HTTP authentication 

 

Q7. Which directive determines whether PHP scripts on the server can acceept file uploads?

a) file_uploads

b) file_upload

c) file_input

d) file_intake

 

Q8. Which of the following directive determines the maximum amount of time that a PHP script will spend attempting to parse input before registering a fatal error?

a) max_take_time

b) max_intake_time

c) max_input_time

d) max_parse_time

 

Q9. What is the default value of max_input_time directive?

a) 30 seconds

b) 60 seconds

c) 120 seconds

d) 1 second

 

Q10. Since which version of PHP was the directive max_file_limit available.

a) PHP 5.2.1

b) PHP 5.2.2

c) PHP 5.2.12

d) PHP 5.2.21

 

Q11. What is the default value of the directive max_file_limit?

a) 10 files

b) 15 files

c) 20 files

d) 25 files

 

Q12. Which directive sets a maximum allowable amount of memory in megabytes that a script can allow?

a) max_size

b) post_max_size

c) max_memory_limit

d) memory_limit 

 

Q13. If you want to temporarily store uploaded files in the /tmp/phpuploads/ directory, which one of the following statement will you use?

a) upload_tmp_dir “/tmp/phpuploads/ directory”

b) upload_dir “/tmp/phpuploads/ directory”

c) upload_temp_dir “/tmp/phpuploads/ directory”

d) upload_temp_director “/tmp/phpuploads/ directory”

 

Q14. Which superglobal stores a variety of information pertinent to a file uploaded to the server via a PHP script?

a) $_FILE Array

b) $_FILEs Array

c) $_FILES_UPLOADED Array

d) $_FILE_UPLOADED Array

 

Q15. Which one of the following function is used to start a session?

a) start_session()

b) session_start()

c) session_begin()

d) begin_session()

 

Q16. Which function is used to erase all session variables stored in the current session?

a) session_destroy()

b) session_change()

c) session_remove()

d) session_unset()

 

Q17. What will the function session_id() return is no parameter is passed?

a) Current Session Identification Number

b) Previous Session Identification Number

c) Last Session Identification Number

d) Error

 

Q18. Which one of the following statements should you use to set the session username to Nachi?

a) $SESSION[‘username’] = “Nachi”;

b) $_SESSION[‘username’] = “Nachi”;

c) session_start(“nachi”);

d) $SESSION_START[“username”] = “Nachi”; 

 

Q19. How many items are available in the $_FILES array?

a) 2

b) 3

c) 4

d) 5

 

Q20. Which function is used to determine whether a file was uploaded?

a) is_file_uploaded()

b) is_uploaded_file()

c) file_uploaded(“filename”)

d) uploaded_file(“filename”) 

 

Part 9: List for questions and answers of PHP

 

Q1. Answer: b

 

Q2. Answer: d

 

Q3. Answer: a

 

Q4. Answer: b

 

Q5. Answer: c

 

Q6. Answer: c

 

Q7. Answer: a

 

Q8. Answer:

 

Q9. Answer: b

 

Q10. Answer: c

 

Q11. Answer: c

 

Q12. Answer: d

 

Q13. Answer: a

 

Q14. Answer: b

 

Q15. Answer: b

 

Q16. Answer: d

 

Q17. Answer: a

 

Q18. Answer: b

 

Q19. Answer: d

 

Q20. Answer: b