Completed tests
Login
Learning aids
Contact us
Login with Facebook
General tests
Programing skills
UK S3-S4
UK S2
Grade 3-4
Grade 4
PHP - Test1
Programing skills - PHP - Math
1.
What does PHP stand now for?
PHP: Hypertext Preprocessor
Private Home Page
Personal Hypertext Processor
2.
PHP server scripts are surrounded by delimiters. Which ones?
<?php>...</?>
<&>...</&>
<script>...</script>
<?php...?>
3.
How do you write "Hello World" in PHP?
"Hello World";
Document.Write("Hello World");
print ("Hello World");
echo "Hello World";
4.
All variables in PHP start with which symbol?
&
#
!
$
5.
What is the correct way to end a PHP statement?
;
.
</cr>
</php>
6.
The PHP syntax is most similar to:
VBScript
Perl and C
JavaScript
7.
How do you get information from a form that is submitted using the "
get
" method?
$_GET[];
Request.QueryString;
Request.Form;
8.
When using the POST method, variables are displayed in the URL:
True
False
9.
In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
True
False
10.
Include files must have the file extension ".inc".
False
True
11.
What is the correct way to include the file "samle1.inc" ?
<?php include: "samle1.inc"; ?>
<!-- include file="samle1.inc" -->
<?php include "samle1.inc"; ?>
<?php include file="samle1.inc"; ?>
12.
What is the correct way to create a function in PHP?
create myFunction()
function myFunction()
new_function myFunction()
13.
What is the correct way to open the file "sample.txt" as readable?
fopen("sample.txt","r+");
open("sample.txt","read");
open("sample.txt");
fopen("sample.txt","r");
14.
PHP allows you to send emails directly from a script.
True
False
15.
What is the correct way to connect to a MySQL database?
mysqli_db(host,username,password,dbname);
db_open(host,username,password,dbname);
mysqli_connect(host,username,password,dbname);
mysqli_open(host,username,password,dbname);
16.
What is the correct way to add 1 to the \$count variable?
$count++;
++count
count++;
$count =+1
17.
What is a correct way to add a comment in PHP?
/*...*/
<comment>...</comment>
*\...\*
<!--...-->
18.
PHP can be run on Microsoft Windows IIS(Internet Information Server):
True
False
19.
The die() and exit() functions in PHP, do the exact same thing.
False
True
20.
Which one of these variables has an illegal name?
$my-Var
$my_Var
$_MyVar
$myVar