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. To assign keys to the values in an array
strip_tags()
isset()
+= or -= or *= or /=
array()
2. A data structure that can hold a number of items of data of the same type eg. a list of names
string
chr()
array
string
3. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
ASP
$array[] = item
$_REQUEST
ceil()
4. To include files - _______ will give errors and _________ will terminate execution().
Warning
associative array
underscores
include() and require()
5. Use ______ when a variable contains any amount of variables; in general.
rand()
double quotes
XOR
Constant
6. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
true
shuffle()
client-side programing
7. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
HTTP
drop
date()
8. To find how many substrings are in a string
boolean
rand()
substr_count()
<<
9. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
Notice
the period; .
chr()
E_STRICT
10. To delete a variable or an element of an array
mysql_close($dbc)
unset()
ASP
error_reporting (E_ALL | E_STRICT)
11. The three types of loops in PHP are: for - while - ____.
mysql_fetch_object()
string
foreach
chr()
12. Used to create a substring (referred to as a token) from a larger string
Shebang
arsort()
strtok()
html_entity_decode()
13. An array whose keys are strings; also known as a hash.
shuffle()
associative array
sql
ini_set ('display_errors', 1)
14. Leading 0x: 0x13F or 0xA23
mysql_close($dbc)
Hex
switch
XML
15. Used to check if a variable has a valid numerical value; strings with numerical values pass.
abs()
index
array
is_numeric()
16. To reset an array _______ the array() function to the array
reassign
HTML
html_entity_decode()
control structure
17. To sort the values while maintaining the correlation between each value and its key - in reversed order
Parse error
include() and require()
Magic Constant
arsort()
18. Tag to end a php script
?>
error_reporting (E_ALL | E_STRICT)
POST
Shebang
19. Used to encrypt values - it is a one-way encryption method
statement
error_reporting (E_ALL)
shuffle()
crypt()
20. print $_SERVER will _____ work if you use the print function on arrays.
not
addslashes()
empty()
float
21. Shorthand used to increment and decrement
==
crypt()
$var++ and $var
preg_replace()
22. Control structure that continue exit - they perform specific statements for a determined number of iterations.
for ($i = 0; $i < count($array); $i++) {statement(s);}
parentheses
loops
drop
23. To sort values of an array in reversed order
rsort()
GET
$dbc = mysql_connect(hostname, username, password)
$varname[key]
24. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
error_reporting (0)
true
GET
superglobal
25. Operators used to operate and assign
mysql_fetch_object()
+= or -= or *= or /=
0
$_SESSION[]
26. This error refers to a variable with no value.
list()
client-side programing
Notice
open source
27. A conditional or loop is a ________________.
urlencode()
parentheses
control structure
function error_reporting()
28. Tag to begin a php script
number_format()
round() Function
<?php
unset()
29. _________ can be used in conditional statements to set precedence
parentheses
int
bin2hex()
integer
30. This will show all error reporting except for notice errors.
predefined variable
error_reporting (E_ALL & -E_NOTICE)
predefined
bin2hex()
31. Used to check if a variable has any value (including 0 or FALSE or an empty string).
preg_match()
>>
addslashes()
isset()
32. a positive or negative number
function error_reporting()
+= or -= or *= or /=
integer
list()
33. identity
predefined
$$
===
octal
34. All variables must begin with _________.
the escape character ''
the dollar sign $
preg_split()
$array[] = item
35. To refer to an item in an array
Array
$varname[key]
precedence
superglobal
36. $_POST and $_GET are ________ variables.
double quotes
rand()
===
predefined
37. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
round() Function
decimal
server-side programing
38. EXtensible Markup Language
Parse error
XML
superglobal
general
39. TRUE or FALSE
arsort()
function
boolean
^
40. bitwise XOR
preg_replace()
Array
^
PHP
41. To counter htmlentities()
html_entity_decode()
chr()
asort()
array()
42. Function that contains the highest value that rand() can have randomly
1
error_reporting (E_ALL & -E_NOTICE)
if/elseif/else and switch statements
getrandmax()
43. Alias of rtrim()
array
chop()
function
1
44. Returns a string with backslashes in front of the specified characters
addcslashes()
^
error_reporting (E_ALL | E_STRICT)
HTML
45. Online applications and resources which are available to the general public with very few restrictions
open source
string
1
if/elseif/else and switch statements
46. To determine the amount of elements in an array
count()
predefined variable
addslashes()
1
47. To sort the values while maintaining the correlation between each value and its key
POST
asort()
getrandmax()
numbers
48. Search Engine Optimization
chr()
SEO
HTML
addcslashes()
49. Used to convert all HTML tags into their entity versions.
htmlentities()
curly braces
the period; .
Magic Constant
50. The four main error types are:Notice - Warning - ________ and Error.
Parse error
error_reporting (E_ALL & -E_NOTICE)
WYSIWYG
===