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
Question 4
Question
All variables in PHP start with which symbol?
Question 5
Question
What is the correct way to end a PHP statement?
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:
Question 9
Question
In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
Question 10
Question
Include files must have the file extension ".inc"
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?
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
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)
Question 19
Question
In PHP, the die() and exit() functions do the exact same thing.
Question 20
Question
Which one of these variables has an illegal name?