PHP 10

Lets Crack Online Exam

IT Interview Exam Paper: PHP 10

Subject: PHP 10

Part 10: List for questions and answers of PHP


Q1. What is the full form of DNS?

a) Digital Network System

b) Domain Network System

c) Digital Name Systmem

d) Domain Name System


Q2. Which one of the following function checks for the existence of DNS records?

a) checkdns()

b) checkdnsr()

c) checkdnsrr()

d) checkdnsa()


Q3. Which one of the following function is used to return an array consisting of various DNS resource records pertinent to a specific domain?

a) dns_get_record()

b) dns_record()

c) dnsrr_get_record()

d) dnsrr_record()


Q4. Which one of the following function is used to retrieve the MX records for the domain specified by hostname?

a) getmx()

b) retrieve_mx()

c) getmxrr()

d) retrieve_mxrr()


Q5. What is the default port number of HTTP’s?

a) 70

b) 80

c) 90

d) 100


Q6. Which one of the following function returns the port number of a specified service?

a) getportname()

b) getservername()

c) getserverbyname()

d) getservbyname() 


Q7. Which one of the following statements can be used to establish port 80 connection with

a) fsockopen(“”, 80);

b) sockopen(80,” ”);

c) fsockopen(80,” ”);

d) sockopen(“ ”, 80);


Q8. Which one of the following function is used to send a e-mail using PHP script?

a) mail_send()

b) send_mail()

c) mailrr()

d) mail()


Q9. How many configuration directives pertinent to PHP’s mail function are available?

a) 4

b) 5

c) 6

d) 7


Q10. Which of the following statements is used to add an attachment to the mail?

a) $mimemail->attachment(‘attachment.pdf’);

b) $mimemail=>attachment(‘attachment.pdf’);

c) $mimemail->addAttachment(‘attachment.pdf’);

d) $mimemail=>addAttachment(‘attachment.pdf’);


Q11. Which one of the following is the very first task executed by a session enabled page?

a) Delete the previous session

b) Start a new session

c) Check whether a valid session exists

d) Handle the session


Q12. How many ways can a session data be stored?

a) 3

b) 4

c) 5

d) 6 


Q13. Which directive determines how the session information will be stored?

a) save_data


c) session.save_data

d) session.save_handler


Q14. Which one of the following is the default PHP session name?






Q15. If session.use_cookie is set to 0, this results in use of..

a) Session

b) Cookie

c) URL rewriting

d) Nothing happens


Q16. If the directive session.cookie_lifetime is set to 3600, the cookie will live until..

a) 3600 sec

b) 3600 min

c) 3600 hrs

d) the browser is restarted


Q17. Neglecting to set which of the following cookie will result in the cookie’s domain being set to the host name of the server which generated it.

a) session.domain

b) session.path

c) session.cookie_path

d) session.cookie_domain


Q18. What is the default number of seconds that cached session pages are made available before the new pages are created?

a) 360

b) 180

c) 3600

d) 1800 


Q19. What is the default time(in seconds) for which session data is considered valid?

a) 1800

b) 3600

c) 1440

d) 1540


Q20. What is the return type of session_set_save_handler() function?

a) boolean

b) integer

c) float

d) character 


Part 10: List for questions and answers of PHP


Q1. Answer: d


Q2. Answer: d


Q3. Answer: a


Q4. Answer: c


Q5. Answer: b


Q6. Answer: d


Q7. Answer: a


Q8. Answer: d


Q9. Answer: d


Q10. Answer: c


Q11. Answer: c


Q12. Answer: b


Q13. Answer: d


Q14. Answer: a


Q15. Answer: c


Q16. Answer: a


Q17. Answer: d


Q18. Answer: b


Q19. Answer: c


Q20. Answer: a