SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Php Programming Basics
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. An array of variables passed in the URL
^
statement
the dollar sign $
$_GET[]
2. Used to encrypt values - it is a one-way encryption method
rand()
null
crypt()
addcslashes()
3. _________ can be used in conditional statements to set precedence
Warning
ksort()
parentheses
strtok()
4. Used to check if a variable has a valid numerical value; strings with numerical values pass.
count()
is_numeric()
substr_count()
$dbc = mysql_connect(hostname, username, password)
5. bitwise XOR
foreach
^
SGML
AJAX
6. The prefix for a dynamic variable - also known as a variable variable
negative numbers
AJAX
foreach
$$
7. EXtensible Markup Language
XML
int
curly braces
mysql_close($dbc)
8. TRUE or FALSE
octal
sort()
if/elseif/else and switch statements
boolean
9. _______ is a comparison operator
boolean
!= inequality
error_reporting (E_ALL | E_STRICT)
Magic Constant
10. Function that contains the highest value that rand() can have randomly
preg_split()
^
Parse error
getrandmax()
11. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
error_reporting (E_ALL | E_STRICT)
the period; .
sql
12. The three types of loops in PHP are: for - while - ____.
foreach
fopen()
precedence
error_reporting (E_ALL | E_STRICT)
13. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
echo
trim()
==
parentheses
14. $_POST and $_GET are ________ variables.
HTTP
addslashes()
the period; .
predefined
15. Use ______ when a variable contains any amount of variables; in general.
echo
0
getrandmax()
double quotes
16. allows you to split strings based on more complex rules
Magic Constant
nl2br()
preg_split()
+= or -= or *= or /=
17. To put a dollar sign before a variable like $10 where 10 is the variable's value - you can escape the first dollar sign; $$cost; or you can use __________.
drop
index
SEO
curly braces; ${$total}
18. ____ or key is referred to for a value within an array.
index
octal
AJAX
parentheses
19. To delete a variable or an element of an array
+= or -= or *= or /=
unset()
crypt()
for ($i = 0; $i < count($array); $i++) {statement(s);}
20. To get time data
open source
date()
for ($i = 0; $i < count($array); $i++) {statement(s);}
$_GET[]
21. The ouput of var_export((bool)"NULL");
true
DTD
reassign
the dollar sign $
22. a line of information that can be stored in a variable or used in a function or statement
list()
string
wordwrap()
GET
23. This error refers to a variable with no value.
parentheses
Notice
floor()
underscores
24. An array whose keys are strings; also known as a hash.
string
+
foreach
associative array
25. An array of variables passed with <input /> data
open source
general
asort()
$_POST[]
26. Hyper Text Markup Language
curly braces; ${$total}
Magic Constant
HTML
bin2hex()
27. Document Type Definitions
$_GET[]
rsort()
DTD
$var++ and $var
28. says 'if' this then do this 'else' do this or 'while' this do this
round() Function
client-side programing
===
statement
29. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
superglobal
if/elseif/else and switch statements
htmlentities()
30. The concatenation assignment operator?
.=
?>
Shebang
abs()
31. Tag to end a php script
?>
substr_count()
open source
true
32. PHP has two conditional: if and ______.
$$
preg_match()
switch
$varname[key]
33. What You See Is What You Get
Parse error
WYSIWYG
addslashes()
count()
34. The order of operations.
client-side programing
>>
precedence
for ($i = 0; $i < count($array); $i++) {statement(s);}
35. To sort by the keys while maintaining the correlation between the key and its value
rand()
decimal
ksort()
?>
36. Operators used to operate and assign
+= or -= or *= or /=
defined()
bin2hex()
numbers
37. used to round numeric values.
addslashes()
HTTP
$array[] = item
round() Function
38. To reorganise the array randomly
shuffle()
E_STRICT
^
predefined
39. To create an array
foreach loop
array()
mysql_fetch_object()
$_SESSION[]
40. To declare a constant
htmlspecialchars()
parentheses
rand()
define()
41. To reset an array _______ the array() function to the array
numbers
list()
reassign
error_reporting (E_ALL | E_STRICT)
42. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
server-side programing
preg_split()
Shebang
43. addition
error_reporting (0)
SGML
float
+
44. collection of binary data
integer
string
SEO
addslashes()
45. standard notation
date()
decimal
round() Function
+
46. The name of the #! used to designate the location of the PHP binary
Shebang
$varname[key]
Notice
Error
47. a language in which to make querys to a database with
the period; .
asort()
sql
$_POST[]
48. To get over quotation marks while using arrays
Parse error
string
curly braces
<?php
49. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
open source
GET
statement
date()
50. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
defined()
integer
strip_tags()
E_STRICT