Roger Stegeby
Quiz by , created more than 1 year ago

A simple quiz about PHP

67
0
0
Roger Stegeby
Created by Roger Stegeby almost 10 years ago
Close

PHP

Question 1 of 20

1

What does PHP stand for?

Select one of the following:

  • Private Home Page

  • PHP: Hypertext Preprocessor

  • Personal Hypertext Processor

  • Professional Hypertext Processor

Explanation

Question 2 of 20

1

PHP server scripts are surrounded by delimiters, which?

Select one of the following:

  • <&>...</&>

  • <?php...?>

  • <script>...</script>

  • <?php>...</?>

Explanation

Question 3 of 20

1

3. How do you output "Hello World" in PHP

Select one of the following:

  • "Hello World";

  • echo "Hello World";

  • Document.Write("Hello World");

Explanation

Question 4 of 20

1

All variables in PHP start with which symbol?

Select one of the following:

  • &

  • $

  • !

  • #

Explanation

Question 5 of 20

1

What is the correct way to end a PHP statement?

Select one of the following:

  • </php>

  • New line

  • ;

  • .

Explanation

Question 6 of 20

1

The PHP syntax is most similar to:

Select one of the following:

  • Perl and C

  • VBScript

  • JavaScript

  • Assembly

Explanation

Question 7 of 20

1

How do you get information from a form that is submitted using the "get" method?

Select one of the following:

  • Request.Form;

  • $_GET[];

  • Request.QueryString;

Explanation

Question 8 of 20

1

When using the POST method, variables are displayed in the URL:

Select one of the following:

  • True
  • False

Explanation

Question 9 of 20

1

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:

Select one of the following:

  • True
  • False

Explanation

Question 10 of 20

1

Include files must have the file extension ".inc"

Select one of the following:

  • True
  • False

Explanation

Question 11 of 20

1

What is the correct way to include the file "time.inc" ?

Select one of the following:

  • <?php include "time.inc"; ?>

  • <?php include:"time.inc"; ?>

  • <?php include file="time.inc"; ?>

  • <!-- include file="time.inc" -->

Explanation

Question 12 of 20

1

What is the correct way to create a function in PHP?

Select one of the following:

  • create myFunction()

  • function myFunction()

  • new_function myFunction()

Explanation

Question 13 of 20

1

What is the correct way to open the file "time.txt" as readable?

Select one of the following:

  • fopen("time.txt","r");

  • open("time.txt");

  • open("time.txt","read");

  • fopen("time.txt","r+");

Explanation

Question 14 of 20

1

PHP allows you to send emails directly from a script

Select one of the following:

  • True
  • False

Explanation

Question 15 of 20

1

What is the correct way to connect to a MySQL database?

Select one of the following:

  • mysqli_open(host,username,password,dbname);

  • mysqli_db(host,username,password,dbname);

  • mysqli_connect(host,username,password,dbname);

Explanation

Question 16 of 20

1

What is the correct way to add 1 to the $count variable?

Select one of the following:

  • $count =+1

  • ++count

  • $count++;

  • count++;

Explanation

Question 17 of 20

1

What is a correct way to add a comment in PHP?

Select one of the following:

  • /*...*/

  • *\...\*

  • <!--...-->

  • <comment>...</comment>

Explanation

Question 18 of 20

1

PHP can be run on Microsoft Windows IIS (Internet Information Server)

Select one of the following:

  • True
  • False

Explanation

Question 19 of 20

1

In PHP, the die() and exit() functions do the exact same thing.

Select one of the following:

  • True
  • False

Explanation

Question 20 of 20

1

Which one of these variables has an illegal name?

Select one of the following:

  • $my_Var

  • $my-Var

  • $myVar

Explanation