PHP exam questions

|  This page may qualify for speedy deletion because: too stubby/incomplete to be of any use (only 4 questions); no further reading/external links; big plans ("The questions are divided into beginner, intermediate and advanced sections") and no implementation; been so since 2007
If you disagree or intend to fix it, and you have not contributed to it before, you may remove this notice. If you have contributed before and disagree, please explain why on the discussion page, after adding {{hangon}} to the top of the . This will alert curators and custodians to your intention, and may permit you the time to write your explanation.

* * *

Before deleting check the discussion page, what links here, history (last edit), the page log, and Wikiversity:Deletions.

|

The following questions are to help you identify where you need more work or for use as a fun quiz-show style game in a classroom.

The questions are divided into beginner, intermediate and advanced sections.

## Beginner[edit | edit source]

1. Write the code that you can include in your file to find out not only whether PHP is supported on your server, but also which version etc.
2. When testing your PHP pages, identify two likely causes of seeing the actual PHP code in your web browser.
3. You're writing a program and need to create a variable called 'count' and set it's initial value to zero. Write the (a) Javascript code that will create your variable, followed by the (b) PHP code that will create your variable.
4. convert the following psuedo-code into PHP:

if the variable $firstname is currently empty, then do the following:

print out the text "You need to enter your firstname" as a paragraph with the class="errormsg"