My Report

PHP Programming Mock Test 3


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. The filesize() function returns the file size in ___________

Question 1 of 10

Question 2 of 10

2. What will be the output of the following PHP code?

    <?php
    $foods = array("pasta", "steak", "fish", "potatoes");
    $food = preg_grep("/^s/", $foods);
    print_r($food);
    ?>

Question 2 of 10

Question 3 of 10

3. Which one of the following is the right description for the method getMessage()?

Question 3 of 10

Question 4 of 10

4. Which of the following statements can be used to set the time zone in individual scripts?

Question 4 of 10

Question 5 of 10

5. Which one of the following filter checks if the variable of the specified type exists?

Question 5 of 10

Question 6 of 10

6. Which one of the following functions can be used to concatenate array elements to form a single delimited string?

Question 6 of 10

Question 7 of 10

7. Which one of the following function operates similarly to fgets(), except that it also strips any HTML and PHP tags form the input?

Question 7 of 10

Question 8 of 10

8. Which function displays the web page's most recent modification date?

Question 8 of 10

Question 9 of 10

9. Which version added the method getPrevious()?

Question 9 of 10

Question 10 of 10

10. Which of the following statements can be used to add two months to the existing date?

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.