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. Which among the following is/are not a metacharacter?

i) \a
ii) \A
iii) \b
iv) \B

Question 1 of 10

Question 2 of 10

2. What does SPL stand for?

Question 2 of 10

Question 3 of 10

3. Which of the following is/are an exception?

i) OutOfBoundException
ii) OutOfRangeException
iii) OverflowException
iv) UnderflowException

Question 3 of 10

Question 4 of 10

4. Which method is simply an object-oriented version of date()?

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 of the following statements can be used to add two months to the existing date?

Question 6 of 10

Question 7 of 10

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

Question 7 of 10

Question 8 of 10

8. Which one of the following filter is used to filter several variables with the same or different filters?

Question 8 of 10

Question 9 of 10

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

    <?php
    $username = "jasoN";
    if (ereg("([^a-z])",$username))
        echo "Username must be all lowercase!";
    else
        echo "Username is all lowercase!";
    ?>

Question 9 of 10

Question 10 of 10

10. Which of the following DateTimeZone classes are non-static?

i) _construct()
ii) getName()
iii) getOffset()
iv) getTransitions()

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.