My Report

PHP Programming Practice 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

1. Which one of the following regular expression matches any string containing zero or one p?

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

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

3. How many functions does PHP offer for searching strings using POSIX style regular expression?

4. 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!";
    ?>

5. Which function sets the file filename last-modified and last-accessed times?

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

7. Which one of the following format parameter can be used to identify timezone?

8. Which among the following is/are not a metacharacter?

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

9. How many constants does the DateTime class have?

10. Which of the following is/are an external data?

i) Cookies
ii) Input data from a form
iii) Server Variables
iv) Web services data

 

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.