MCQOPTIONS
Saved Bookmarks
This section includes 30 Mcqs, each offering curated multiple-choice questions to sharpen your Php knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is the default port number of HTTP’s? |
| A. | 0 |
| B. | 0 |
| C. | 0 |
| D. | 00 |
| Answer» C. 0 | |
| 2. |
Which one of the following function is used to send a e-mail using PHP script? |
| A. | ail_send() |
| B. | end_mail() |
| C. | ailrr() |
| D. | ail() |
| Answer» E. | |
| 3. |
Which one of the following statements can be used to establish port 80 connection with www.examveda.com? |
| A. | sockopen(“www.examveda.com”, 80); |
| B. | ockopen(80,”www.examveda.com”); |
| C. | sockopen(80,”www.examveda.com”); |
| D. | ockopen(“www.examveda.com”, 80); |
| Answer» B. ockopen(80,”www.examveda.com”); | |
| 4. |
Which of the following network transports doesn’t PHP support? |
| A. | cp |
| B. | dp |
| C. | dg |
| D. | dc |
| E. | nix |
| Answer» E. nix | |
| 5. |
What will the following script do? |
| A. | list of the FTP servers on the local network |
| B. | he address of the FTP server called “tcp” |
| C. | he port associated with the TCP service called “FTP” |
| D. | list of the ports associated with all services except FTP |
| Answer» D. list of the ports associated with all services except FTP | |
| 6. |
Which of the following operations cannot be performed using the standard ftp:// stream wrapper?1. Reading a file2. Writing a file3. Establishing a stateful connection and changing directories interactively4. Creating a new directory |
| A. | ption 3 and 4 |
| B. | ption 1 and 3 |
| C. | ption 2 and 4 |
| D. | ption 1 and 4 |
| Answer» B. ption 1 and 3 | |
| 7. |
The ftp_mkdir() function creates a directory on the FTP server. |
| A. | tp_mkdir() |
| B. | tp_makekdir() |
| C. | tp_mkdirectory() |
| D. | oth A & B |
| Answer» B. tp_makekdir() | |
| 8. |
The windows version of PHP has built-in support for the FTP extension |
| A. | rue |
| B. | alse |
| Answer» B. alse | |
| 9. |
What function can you use to create your own streams using the PHP stream wrappers and register them within PHP? |
| A. | rapper_register |
| B. | tream_wrapper |
| C. | tream_wrapper_register |
| D. | tream_wrapper_reg |
| Answer» D. tream_wrapper_reg | |
| 10. |
What will the following script do?%! |
| A. | A list of the FTP servers on the local network |
| B. | The address of the FTP server called “tcp” |
| C. | The port associated with the TCP service called “FTP” |
| D. | A list of the ports associated with all services except FTP |
| Answer» D. A list of the ports associated with all services except FTP | |
| 11. |
Which of the following operations cannot be performed using the standard ftp:// stream wrapper?¬¨‚Ä 1. Reading a file2. Writing a file3. Establishing a stateful connection and changing directories interactively4. Creating a new directory%! |
| A. | Option 3 and 4 |
| B. | Option 1 and 3 |
| C. | Option 2 and 4 |
| D. | Option 1 and 4 |
| Answer» B. Option 1 and 3 | |
| 12. |
The ftp_mkdir() function creates a directory on the FTP server.%! |
| A. | ftp_mkdir() |
| B. | ftp_makekdir() |
| C. | ftp_mkdirectory() |
| D. | Both A & B |
| Answer» B. ftp_makekdir() | |
| 13. |
The windows version of PHP has built-in support for the FTP extension%! |
| A. | True |
| B. | False |
| Answer» B. False | |
| 14. |
What function can you use to create your own streams using the PHP stream wrappers and register them within PHP?%! |
| A. | wrapper_register |
| B. | stream_wrapper |
| C. | stream_wrapper_register |
| D. | stream_wrapper_reg |
| Answer» D. stream_wrapper_reg | |
| 15. |
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’); |
| Answer» D. $mimemail=>addAttachment(‚Äö√Ñ√≤attachment.pdf‚Äö√Ñ√¥); | |
| 16. |
*$_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’); |
| Answer» D. $mimemail=>addAttachment(‚Äö√Ñ√≤attachment.pdf‚Äö√Ñ√¥); | |
| 17. |
*$_What is the default port number of HTTP’s?? |
| A. | 70 |
| B. | 80 |
| C. | 90 |
| D. | 100 |
| Answer» C. 90 | |
| 18. |
%_How many configuration directives pertinent to PHP’s mail function are available?_% |
| A. | 4 |
| B. | 5 |
| C. | 6 |
| D. | 7 |
| Answer» C. 6 | |
| 19. |
%_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() |
| Answer» D. retrieve_mxrr() | |
| 20. |
__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() |
| Answer» E. | |
| 21. |
_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() |
| Answer» B. dns_record() | |
| 22. |
Which one of the following statements can be used to establish port 80 connection with www.examveda.com?$? |
| A. | fsockopen(“www.examveda.com”, 80); |
| B. | sockopen(80,”www.examveda.com”); |
| C. | fsockopen(80,”www.examveda.com”); |
| D. | sockopen(“www.examveda.com”, 80); |
| Answer» B. sockopen(80,‚Äö√Ñ√πwww.examveda.com‚Äö√Ñ√π); | |
| 23. |
Which one of the following function checks for the existence of DNS records?$? |
| A. | checkdns() |
| B. | checkdnsr() |
| C. | checkdnsrr() |
| D. | checkdnsa() |
| Answer» D. checkdnsa() | |
| 24. |
Which one of the following statements can be used to establish port 80 connection with www.examveda.com?? |
| A. | fsockopen(“www.examveda.com”, 80); |
| B. | sockopen(80,”www.examveda.com”); |
| C. | fsockopen(80,”www.examveda.com”); |
| D. | sockopen(“www.examveda.com”, 80); |
| Answer» B. sockopen(80,‚Äö√Ñ√πwww.examveda.com‚Äö√Ñ√π); | |
| 25. |
Which one of the following function checks for the existence of DNS records?? |
| A. | checkdns() |
| B. | checkdnsr() |
| C. | checkdnsrr() |
| D. | checkdnsa() |
| Answer» D. checkdnsa() | |
| 26. |
Which of the following are valid PHP stream transports?1. http2. STDIO3. ftp4. STDOUT5. stream |
| A. | Option 3 and 5 |
| B. | Option 1 and 4 |
| C. | Option 4 and 5 |
| D. | Option 2 and 5 |
| Answer» E. | |
| 27. |
The FTP functions are used to ....... files from file servers. |
| A. | Open |
| B. | Download |
| C. | Close |
| D. | Upload |
| E. | All of above |
| Answer» F. | |
| 28. |
Which of the following network transports doesn’t PHP support?$ |
| A. | tcp |
| B. | udp |
| C. | udg |
| D. | pdc |
| E. | unix |
| Answer» E. unix | |
| 29. |
When dealing with timeout values in sockets, the connection timeout can be changed independently of the read/write time out. Which function must be used for this purpose? |
| A. | stream_get_timeout |
| B. | stream_set_timeout |
| C. | stream_fset_timeout |
| D. | stream_fget_timeout |
| Answer» C. stream_fset_timeout | |
| 30. |
The ftp_size() function returns the size of a specified file on the FTP server. |
| A. | get_ftp_size() |
| B. | ftp_file_size() |
| C. | ftp_size() |
| D. | ftp_amount() |
| Answer» D. ftp_amount() | |