Quiz
PHP
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (20)
1What does PHP stand for?
- APrivate Home Page
- BPHP: Hypertext Preprocessor
- CPersonal Hypertext Processor
- DProfessional Hypertext Processor
2PHP server scripts are surrounded by delimiters, which?
- A<&>...</&>
- B<?php...?>
- C<script>...</script>
- D<?php>...</?>
33. How do you output "Hello World" in PHP
- A"Hello World";
- Becho "Hello World";
- CDocument.Write("Hello World");
4All variables in PHP start with which symbol?
- A&
- B$
- C!
- D#
5What is the correct way to end a PHP statement?
- A</php>
- BNew line
- C;
- D.
6The PHP syntax is most similar to:
- APerl and C
- BVBScript
- CJavaScript
- DAssembly
7How do you get information from a form that is submitted using the "get" method?
- ARequest.Form;
- B$_GET[];
- CRequest.QueryString;
8When using the POST method, variables are displayed in the URL:
- ATrue
- BFalse
9In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
- ATrue
- BFalse
10Include files must have the file extension ".inc"
- ATrue
- BFalse
11What is the correct way to include the file "time.inc" ?
- A<?php include "time.inc"; ?>
- B<?php include:"time.inc"; ?>
- C<?php include file="time.inc"; ?>
- D<!-- include file="time.inc" -->
12What is the correct way to create a function in PHP?
- Acreate myFunction()
- Bfunction myFunction()
- Cnew_function myFunction()
13What is the correct way to open the file "time.txt" as readable?
- Afopen("time.txt","r");
- Bopen("time.txt");
- Copen("time.txt","read");
- Dfopen("time.txt","r+");
14PHP allows you to send emails directly from a script
- ATrue
- BFalse
15What is the correct way to connect to a MySQL database?
- Amysqli_open(host,username,password,dbname);
- Bmysqli_db(host,username,password,dbname);
- Cmysqli_connect(host,username,password,dbname);
16What is the correct way to add 1 to the $count variable?
- A$count =+1
- B++count
- C$count++;
- Dcount++;
17What is a correct way to add a comment in PHP?
- A/*...*/
- B*\...\*
- C<!--...-->
- D<comment>...</comment>
18PHP can be run on Microsoft Windows IIS (Internet Information Server)
- ATrue
- BFalse
19In PHP, the die() and exit() functions do the exact same thing.
- ATrue
- BFalse
20Which one of these variables has an illegal name?
- A$my_Var
- B$my-Var
- C$myVar
Information
- Description
- A simple quiz about PHP
- Author
- Roger Stegeby
- Language
- English
- Views
- 90
- Tags
- Rating
- No ratings yet Rate this quiz