Login | Contact Us | Site Map | Resources

Intermediate PHP Quiz

Log in before taking this test if you want your score to be saved in order to receive a certification of achievement. If you are not yet a member, you can register free of charge.

1. Which format is the most likely result of date("F j, Y", $timestamp);?

2:30 PM

June 8, 1995

1289673723


Bonus Question: What are spider's webs good for?

Dogs

Giraffes

Spiders

Porcupines

Frogs


2. Which of the following is commonly used for arrays?

For

Switch

if... elseif... else…

do... while

foreach


3. When is the best time to create your own function?

When The Code Needs Documented

After Supper

When Your Code Gets Really Long

When You Have a Script to Write

When You Plan to Reuse Code


4. What is the proper syntax of the mail() function?

mail(message,subject,to,headers)

mail(to,message,subject,headers)

mail(subject,message,to,headers)

mail(to,subject,message,headers)

mail(headers,message,to,subject)


5. What is the proper syntax of an "if" condition?

if {condition} ( action to take )

if (action to take) { condition }

if (condition) { action to take }

if {action to take} ( condition )


Bonus Question: If Ireland sank into the sea, what county wouldn't sink?

Mayo

Dublin

Limerick

Cork

Kerry


6. Is "If… Elseif… Else" the proper order?

Yes

No


7. $language['php'] is an example of...

a multidimensional array

a numerical array

an associative array


8. Which function, if it produces an error, will terminate the script?

include()

require()


9. Which example demonstrates valid usage of the strlen() function?

echo strlen("Is this correct?")

$variable strlen("Is this correct?");

echo strlen(What about this?);

$variable = strlen("And this?");

echo = strlen("How about this?");


10. Arrays can be sorted, shuffled, grouped, counted, split, etc.

True

False


11. Regular expressions are patterns that work exclusively with integers.

True

False


12. Which of the following is not a string function?

trim()

rand()

stripslashes()

strstr()

print()


13. What is the name of the variable type in which multiple (separate) values can be stored?

float

boolean

array

string

integer