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. Used to check if a variable has any value (including 0 or FALSE or an empty string).
array
associative array
curly braces; ${$total}
isset()
2. The prefix for a dynamic variable - also known as a variable variable
XML
$$
$_SESSION[]
double quotes
3. To sort the values while maintaining the correlation between each value and its key - in reversed order
===
arsort()
predefined
$dbc = mysql_connect(hostname, username, password)
4. a language in which to make querys to a database with
Array
POST
str_ireplace()
sql
5. An array of variables passed in the URL
single quotes
mysql_fetch_array()
$_GET[]
Error
6. A conditional or loop is a ________________.
control structure
&
curly braces; ${$total}
E_STRICT
7. says 'if' this then do this 'else' do this or 'while' this do this
true
statement
server-side programing
mysql_fetch_object()
8. Operators used to operate and assign
mysql_fetch_object()
double quotes
+= or -= or *= or /=
count()
9. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
client-side programing
GET
$array[] = item
unset()
10. The concatenation assignment operator?
mysql
.=
foreach loop
mysql_fetch_array()
11. TRUE or FALSE
sort()
boolean
===
unset()
12. _____ is a logical operator
error_reporting (0)
<<
XOR
1
13. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
foreach loop
chop()
ksort()
14. All variables must begin with _________.
control structure
the dollar sign $
integer
==
15. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
Object
preg_split()
number_format()
superglobal
16. Variable names cannot begin with _______
array_merge()
HTML
numbers
predefined variable
17. PHP has two conditional: if and ______.
switch
single quotes
^
PHP
18. Hyper Text Transfer Protocol
date()
list()
HTTP
ceil()
19. An array whose keys are numbers.
PHP
include() and require()
Hex
indexed array
20. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
Parse error
<<
control structure
predefined variable
21. The four main error types are:Notice - Warning - ________ and Error.
for ($i = 0; $i < count($array); $i++) {statement(s);}
Parse error
ini_set ('display_errors', 1)
$array[] = item
22. To set up error reporting
str_word_count()
strtok()
function error_reporting()
substr_count()
23. ____ or key is referred to for a value within an array.
Parse error
index
include() and require()
$varname[key]
24. This will show all errors that fall under E_ALL or E_STRICT - the pipe | is used for 'or' so that errors that fall under either will be shown.
defined()
addslashes()
error_reporting (E_ALL | E_STRICT)
loops
25. To iterate over the keys and values of an array
drop
$_POST[]
foreach loop
array()
26. Document Type Definitions
DTD
not
curly braces; ${$total}
XML
27. Returns a string with backslashes in front of predefined characters
getrandmax()
addslashes()
ceil()
open source
28. To create an array
echo
array()
string
str_word_count()
29. Converts a string of ASCII characters to hexadecimal values
preg_match()
$var++ and $var
bin2hex()
wordwrap()
30. To remove all HTML and PHP tags.
ASP
strip_tags()
number_format()
preg_split()
31. Control structures that break exit
octal
===
if/elseif/else and switch statements
not
32. searches the subject for matches to a given pattern replaced with the given replacement text
$var++ and $var
include() and require()
double quotes
preg_replace()
33. An array of variables passed with <input /> data
single quotes
Parse error
$_POST[]
bin2hex()
34. To counter htmlentities()
predefined
html_entity_decode()
HTML
Object
35. Returns a string with backslashes in front of the specified characters
addcslashes()
number_format()
precedence
$var++ and $var
36. Used to replace a substring with another string - it is not case-sensitive.
GET
str_ireplace()
round() Function
curly braces; ${$total}
37. any programing language where the user must support the language the script is written in
array()
client-side programing
+
null
38. leading zero: 0100 or 0567
decimal
octal
HTML
addslashes()
39. Used to convert all HTML tags into their entity versions.
htmlentities()
predefined
function error_reporting()
addcslashes()
40. This error refers to a variable with no value.
mysql
Notice
htmlspecialchars()
POST
41. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
superglobal
error_reporting (E_ALL)
nl2br()
+= or -= or *= or /=
42. To sort the values while maintaining the correlation between each value and its key
drop
asort()
arsort()
isset()
43. Uses two arguments: constant name and constant definition
single quotes
shuffle()
define()
date()
44. Use ______ when a variable contains any amount of variables; in general.
if/elseif/else and switch statements
Constant
predefined
double quotes
45. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
Hex
$$
empty()
E_STRICT
46. EXtensible Markup Language
$_GET[]
crypt()
==
XML
47. Leading 0x: 0x13F or 0xA23
Hex
foreach
fopen()
index
48. A data structure that can hold a number of items of data of the same type eg. a list of names
array
unset()
curly braces
curly braces; ${$total}
49. Hyper Text Markup Language
string
defined()
HTML
error_reporting (E_ALL | E_STRICT)
50. To refer to an item in an array
$varname[key]
precedence
integer
array_merge()