PHP

Description

A simple quiz about PHP
Roger Stegeby
Quiz by Roger Stegeby, updated more than 1 year ago
Roger Stegeby
Created by Roger Stegeby about 9 years ago
60
0

Resource summary

Question 1

Question
What does PHP stand for?
Answer
  • Private Home Page
  • PHP: Hypertext Preprocessor
  • Personal Hypertext Processor
  • Professional Hypertext Processor

Question 2

Question
PHP server scripts are surrounded by delimiters, which?
Answer
  • <&>...</&>
  • <?php...?>
  • <script>...</script>
  • <?php>...</?>

Question 3

Question
3. How do you output "Hello World" in PHP
Answer
  • "Hello World";
  • echo "Hello World";
  • Document.Write("Hello World");

Question 4

Question
All variables in PHP start with which symbol?
Answer
  • &
  • $
  • !
  • #

Question 5

Question
What is the correct way to end a PHP statement?
Answer
  • </php>
  • New line
  • ;
  • .

Question 6

Question
The PHP syntax is most similar to:
Answer
  • Perl and C
  • VBScript
  • JavaScript
  • Assembly

Question 7

Question
How do you get information from a form that is submitted using the "get" method?
Answer
  • Request.Form;
  • $_GET[];
  • Request.QueryString;

Question 8

Question
When using the POST method, variables are displayed in the URL:
Answer
  • True
  • False

Question 9

Question
In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
Answer
  • True
  • False

Question 10

Question
Include files must have the file extension ".inc"
Answer
  • True
  • False

Question 11

Question
What is the correct way to include the file "time.inc" ?
Answer
  • <?php include "time.inc"; ?>
  • <?php include:"time.inc"; ?>
  • <?php include file="time.inc"; ?>
  • <!-- include file="time.inc" -->

Question 12

Question
What is the correct way to create a function in PHP?
Answer
  • create myFunction()
  • function myFunction()
  • new_function myFunction()

Question 13

Question
What is the correct way to open the file "time.txt" as readable?
Answer
  • fopen("time.txt","r");
  • open("time.txt");
  • open("time.txt","read");
  • fopen("time.txt","r+");

Question 14

Question
PHP allows you to send emails directly from a script
Answer
  • True
  • False

Question 15

Question
What is the correct way to connect to a MySQL database?
Answer
  • mysqli_open(host,username,password,dbname);
  • mysqli_db(host,username,password,dbname);
  • mysqli_connect(host,username,password,dbname);

Question 16

Question
What is the correct way to add 1 to the $count variable?
Answer
  • $count =+1
  • ++count
  • $count++;
  • count++;

Question 17

Question
What is a correct way to add a comment in PHP?
Answer
  • /*...*/
  • *\...\*
  • <!--...-->
  • <comment>...</comment>

Question 18

Question
PHP can be run on Microsoft Windows IIS (Internet Information Server)
Answer
  • True
  • False

Question 19

Question
In PHP, the die() and exit() functions do the exact same thing.
Answer
  • True
  • False

Question 20

Question
Which one of these variables has an illegal name?
Answer
  • $my_Var
  • $my-Var
  • $myVar
Show full summary Hide full summary

Similar

Test I. Introduction to web technologies
Angel Martínez Rodriguez
Evaluación de Programación (MYSQL y PHP)
Mitchel Romero C
OpenSource Programming
Faheem Ahmed
PHP Exam One
tr.badhan
PHP & MySQL
hratg
PHP intro
Māris Ozoliņš
Programming and Scripting Skills Needed
neteng33
Chapter 6: PHP
Rebecca Walton
Plugin Development
Joshua Reeves
WebTervezés
Nagy Ádám