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. identity
Parse error
===
mysql
&
2. Used to convert all HTML tags into their entity versions.
Notice
addcslashes()
count()
htmlentities()
3. Function used to round down to the lowest integer
floor()
substr_count()
abs()
int
4. leading zero: 0100 or 0567
string
ASP
PHP
octal
5. _____ is a logical operator
floor()
Shebang
foreach
XOR
6. The ouput of var_export((bool)"NULL");
true
mysql_close($dbc)
array
sort()
7. To reset an array _______ the array() function to the array
$_SESSION[]
array()
reassign
$var++ and $var
8. An array whose keys are strings; also known as a hash.
echo
round() Function
associative array
addcslashes()
9. says 'if' this then do this 'else' do this or 'while' this do this
defined()
statement
integer
empty()
10. 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 __________.
Constant
not
switch
curly braces; ${$total}
11. The output of var_export((float)array());
0
$varname[key]
list()
client-side programing
12. The order of operations.
preg_split()
precedence
htmlentities()
chop()
13. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
numbers
&
octal
14. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
WYSIWYG
rand()
number_format()
trim()
15. ___________ can be used with substr() to count backward
negative numbers
nl2br()
preg_replace()
DTD
16. Function used to find the absolute value of a number or numeric variable
===
function error_reporting()
boolean
abs()
17. Search Engine Optimization
count()
SEO
Object
htmlentities()
18. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
drop
DTD
E_STRICT
$$
19. To close a connection between a database
array_merge()
sort()
mysql_close($dbc)
foreach
20. An array whose keys are numbers.
error_reporting (E_ALL & -E_NOTICE)
indexed array
double quotes
the dollar sign $
21. container of both data and code
error_reporting (E_ALL)
Object
isset()
ini_set ('display_errors', 1)
22. To sort values of an array without regard to the keys
sort()
XOR
0
getrandmax()
23. a type with two possible values: true and false
unset()
negative numbers
boolean
superglobal
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.
POST
<<
error_reporting (E_ALL | E_STRICT)
strlen()
25. Active Server Pages
Error
str_ireplace()
Constant
ASP
26. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
double quotes
strip_tags()
nl2br()
$varname[key]
27. To word wrap after a certain amount of characters.
underscores
addcslashes()
===
wordwrap()
28. bitwise left shift
Shebang
abs()
$_SESSION[]
<<
29. To sort by the keys while maintaining the correlation between the key and its value
double quotes
chr()
Shebang
ksort()
30. To reorganise the array randomly
error_reporting (E_ALL | E_STRICT)
shuffle()
crypt()
count()
31. To iterate over the keys and values of an array
foreach loop
arsort()
preg_replace()
negative numbers
32. Use ______ when a variable contains any amount of variables; in general.
boolean
Parse error
double quotes
POST
33. A data structure that can hold a number of items of data of the same type eg. a list of names
unset()
error_reporting (E_ALL & -E_NOTICE)
$_POST[]
array
34. addition
+
open source
array()
E_STRICT
35. Standard Generalized Markup Language
predefined
Notice
SGML
underscores
36. The three types of loops in PHP are: for - while - ____.
shuffle()
Shebang
rand()
foreach
37. To set up error reporting
chop()
include() and require()
error_reporting (E_ALL & -E_NOTICE)
function error_reporting()
38. EXtensible Markup Language
str_ireplace()
===
XML
$_SESSION[]
39. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
trim()
predefined
str_ireplace()
40. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
unset()
mysql_fetch_array()
round() Function
bin2hex()
41. To find how many substrings are in a string
str_word_count()
include() and require()
substr_count()
loops
42. Variable names can begin with __________
underscores
XML
array()
GET
43. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
switch
not
$array[] = item
$_SESSION[]
44. ____ or key is referred to for a value within an array.
true
error_reporting (E_ALL)
index
arsort()
45. Operators used to operate and assign
+= or -= or *= or /=
str_word_count()
switch
loops
46. signed integer
$$
loops
int
AJAX
47. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
$varname[key]
POST
shuffle()
error_reporting (E_ALL & -E_NOTICE)
48. To refer to an item in an array
$varname[key]
parentheses
shuffle()
isset()
49. To counter htmlentities()
addcslashes()
DTD
boolean
html_entity_decode()
50. What You See Is What You Get
html_entity_decode()
negative numbers
WYSIWYG
variable