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
str_ireplace()
Shebang
$_GET[]
preg_split()
2. The four main error types are:Notice - Warning - ________ and Error.
general
Parse error
sql
Array
3. The syntax for connecting to a database
single quotes
wordwrap()
$dbc = mysql_connect(hostname, username, password)
predefined
4. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
^
define()
array
5. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
open source
AJAX
indexed array
6. Returns a string with backslashes in front of predefined characters
mysql_close($dbc)
include() and require()
addslashes()
Object
7. $_POST Data sent using POST found is sent to _______
?>
AJAX
Shebang
predefined variable
8. the most basic function in PHP used to output information to the page
getrandmax()
<<
$_SESSION[]
echo
9. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
curly braces; ${$total}
index
sort()
superglobal
10. a positive or negative number
list()
str_word_count()
bin2hex()
integer
11. This will show all error reporting.
curly braces
drop
error_reporting (E_ALL)
0
12. PHP has two conditional: if and ______.
switch
$$
sort()
ceil()
13. Leading 0x: 0x13F or 0xA23
chr()
boolean
asort()
Hex
14. Variable names cannot begin with _______
array
error_reporting (0)
numbers
$_GET[]
15. To reorganise the array randomly
array_merge()
shuffle()
Notice
$_POST[]
16. identity
===
for ($i = 0; $i < count($array); $i++) {statement(s);}
strip_tags()
Error
17. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
superglobal
$_REQUEST
isset()
addslashes()
18. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
defined()
ASP
precedence
19. Variable names can begin with __________
Parse error
urlencode()
underscores
boolean
20. To delete a variable or an element of an array
index
mysql_fetch_object()
preg_replace()
unset()
21. To reset an array _______ the array() function to the array
array_merge()
trim()
Parse error
reassign
22. Function used to round up to the highest integer
ceil()
+
server-side programing
foreach
23. 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
curly braces
double quotes
24. equivalence
curly braces; ${$total}
reassign
==
isset()
25. To refer to an item in an array
switch
SEO
getrandmax()
$varname[key]
26. does a certain action when called upon
function
Shebang
shuffle()
string
27. Hyper Text Markup Language
negative numbers
HTML
string
Hex
28. This error arises from misusing a function.
==
Warning
^
mysql_close($dbc)
29. addition
$varname[key]
+
reassign
list()
30. To remove all HTML and PHP tags.
number_format()
addslashes()
strip_tags()
Parse error
31. searches the subject for matches to a given pattern replaced with the given replacement text
round() Function
preg_replace()
client-side programing
date()
32. collection of binary data
substr_count()
empty()
string
HTTP
33. To iterate over the keys and values of an array
foreach loop
for ($i = 0; $i < count($array); $i++) {statement(s);}
sql
list()
34. bitwise left shift
Array
<<
server-side programing
WYSIWYG
35. To counter htmlentities()
function error_reporting()
html_entity_decode()
^
error_reporting (E_ALL & -E_NOTICE)
36. This error refers to a variable with no value.
open source
drop
Notice
^
37. To merge arrays
$varname[key]
<<
Error
array_merge()
38. To set up error reporting
mysql_fetch_array()
HTML
string
function error_reporting()
39. Used to create a substring (referred to as a token) from a larger string
variable
error_reporting (0)
strtok()
DTD
40. This fatal error arises from memory allocation problem.
sql
array
Error
GET
41. When used the value can be passed safely through the URL (GET).
urlencode()
function error_reporting()
SGML
===
42. To check if a constant is already declared
defined()
array()
Parse error
==
43. To determine the amount of elements in an array
general
open source
count()
Parse error
44. used to round numeric values.
error_reporting (E_ALL)
define()
round() Function
is_numeric()
45. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
AJAX
chop()
error_reporting (E_ALL)
46. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
chop()
precedence
count()
47. a type with two possible values: true and false
Magic Constant
define()
mysql_fetch_object()
boolean
48. a database which is best supported by PHP
parentheses
number_format()
mysql
urlencode()
49. To get time data
error_reporting (E_ALL | E_STRICT)
date()
asort()
$_REQUEST
50. Document Type Definitions
define()
$_SESSION[]
DTD
ASP