MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
<?php &dollar;url = "lfc123456@example.com"; echo ltrim(strstr(&dollar;url, "@"),"@");?>20.How many functions does PHP offer for searching strings using POSIX style regular expression? |
| A. | 7 |
| B. | 8 |
| C. | 9 |
| D. | 10 |
| E. | |
| Answer» B. 8 | |
| 2. |
<?php &dollar;title = "O malley wins the heavyweight championship!"; echo ucwords(&dollar;title);?>19.What will be the output of the following PHP code? |
| A. | lfc123456@example.com |
| B. | lfc123456 |
| C. | lfc123456@ |
| D. | example.com |
| Answer» E. | |
| 3. |
What is the use of htmlentities() function in php? |
| A. | Converts characters to HTML entities |
| B. | Converts HTML entities to characters |
| C. | Converts some predefined HTML entities to characters |
| D. | Converts some predefined characters to HTML entities |
| Answer» B. Converts HTML entities to characters | |
| 4. |
Which function is used to Calculate a 32-bit CRC for a string? |
| A. | crc32() |
| B. | crypt() |
| C. | heb32() |
| D. | heb32c() |
| Answer» B. crypt() | |
| 5. |
The PHP function searches for a specific text within a string. |
| A. | strpos() |
| B. | strposition() |
| C. | strrev() |
| D. | str_replace() |
| Answer» B. strposition() | |
| 6. |
<?phpecho count_chars("AA",1);?>13.A variable $str is set to "HELLO WORLD", which of the following script returns it title case? |
| A. | echo ucwords($str) |
| B. | echo ucwords(strtolower($str) |
| C. | echo ucfirst($str) |
| D. | echo ucfirst(strtolower($str) |
| Answer» C. echo ucfirst($str) | |
| 7. |
<?php&dollar;str="chess was played";echo strlen(substr(&dollar;str,3,2)).""?>12.Predict the output of the following code snippet : |
| A. | 2 |
| B. | [65]=>2 |
| C. | Array |
| D. | None of the above |
| Answer» D. None of the above | |
| 8. |
Predict the output of the following code snippet : |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | Array |
| Answer» C. 3 | |