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 iterate over the keys and values of an array
===
error_reporting (E_ALL & -E_NOTICE)
+
foreach loop
2. EXtensible Markup Language
Warning
ksort()
associative array
XML
3. Used to replace a substring with another string - it is not case-sensitive.
array()
curly braces; ${$total}
$dbc = mysql_connect(hostname, username, password)
str_ireplace()
4. Tag to end a php script
reassign
?>
null
true
5. Tag to begin a php script
octal
function
ksort()
<?php
6. ____ or key is referred to for a value within an array.
for ($i = 0; $i < count($array); $i++) {statement(s);}
$_POST[]
index
sql
7. This error refers to a variable with no value.
list()
indexed array
Notice
null
8. $_POST and $_GET are ________ variables.
trim()
predefined
string
>>
9. The concatenation operator?
string
the period; .
preg_match()
decimal
10. Used to find the amount of words in a string.
1
SGML
str_word_count()
date()
11. To create an array
integer
decimal
PHP
array()
12. collection of binary data
string
XML
strlen()
rsort()
13. To reset an array _______ the array() function to the array
Notice
the escape character ''
general
reassign
14. either hasn't yet been set or is assigned NULL value
$$
null
E_STRICT
curly braces; ${$total}
15. The concatenation assignment operator?
DTD
drop
empty()
.=
16. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
error_reporting (E_ALL | E_STRICT)
Hex
E_STRICT
+= or -= or *= or /=
17. The ouput of var_export((bool)"NULL");
list()
true
rand()
+
18. Used to convert all HTML tags into their entity versions.
date()
mysql
htmlentities()
E_STRICT
19. does a certain action when called upon
strip_tags()
curly braces
===
function
20. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
if/elseif/else and switch statements
mysql_fetch_object()
the period; .
POST
21. An array whose keys are strings; also known as a hash.
mysql_fetch_object()
strip_tags()
associative array
client-side programing
22. Use ______ when there are no variables in the string
single quotes
foreach
abs()
str_ireplace()
23. To sort the values while maintaining the correlation between each value and its key
echo
preg_split()
asort()
urlencode()
24. An array of variables passed in the URL
date()
$_GET[]
control structure
number_format()
25. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
switch
$array[] = item
number_format()
single quotes
26. The prefix for a dynamic variable - also known as a variable variable
Notice
$$
<<
list()
27. To set up error reporting
!= inequality
octal
function error_reporting()
substr_count()
28. bitwise left shift
^
<<
precedence
preg_match()
29. addition
nl2br()
+
Error
single quotes
30. Define(NAME,value)
switch
Constant
the escape character ''
octal
31. used to round numeric values.
switch
$var++ and $var
round() Function
predefined
32. To assign keys to the values in an array
strlen()
function error_reporting()
array()
index
33. print $_SERVER will _____ work if you use the print function on arrays.
not
crypt()
SEO
predefined
34. To counter htmlentities()
array()
$dbc = mysql_connect(hostname, username, password)
html_entity_decode()
array
35. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
indexed array
nl2br()
str_word_count()
unset()
36. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
predefined
variable
POST
+
37. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
bin2hex()
general
variable
$dbc = mysql_connect(hostname, username, password)
38. Used to display errors in a particular script - should be placed at top of script.
39. the most basic function in PHP used to output information to the page
list()
echo
preg_split()
$array[] = item
40. This will show all error reporting except for notice errors.
for ($i = 0; $i < count($array); $i++) {statement(s);}
Hex
error_reporting (E_ALL & -E_NOTICE)
.=
41. Operators used to operate and assign
!= inequality
WYSIWYG
trim()
+= or -= or *= or /=
42. allows you to split strings based on more complex rules
preg_split()
define()
curly braces; ${$total}
html_entity_decode()
43. To declare a constant
E_STRICT
null
define()
substr_count()
44. To determine the amount of elements in an array
foreach loop
client-side programing
count()
not
45. All variables must begin with _________.
reassign
the dollar sign $
$_GET[]
Notice
46. a type with two possible values: true and false
associative array
precedence
drop
boolean
47. ___________ can be used with substr() to count backward
function
predefined variable
superglobal
negative numbers
48. any programing language where the user must support the language the script is written in
$varname[key]
arsort()
client-side programing
mysql_fetch_array()
49. Hyper Text Transfer Protocol
HTTP
mysql_fetch_object()
html_entity_decode()
drop
50. Search Engine Optimization
SEO
strlen()
error_reporting (E_ALL)
.=