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 append elements to an array - this will assign item to the next available index; associative arrays get messy.
negative numbers
!= inequality
trim()
$array[] = item
2. To declare a constant
preg_match()
superglobal
htmlspecialchars()
define()
3. any programing language where the user must support the language the script is written in
the dollar sign $
client-side programing
shuffle()
foreach
4. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
$_GET[]
error_reporting (E_ALL | E_STRICT)
octal
trim()
5. $_POST and $_GET are ________ variables.
rsort()
boolean
Notice
predefined
6. Hyper Text Markup Language
HTML
^
AJAX
1
7. Use ______ when there are no variables in the string
arsort()
wordwrap()
string
single quotes
8. Used to convert certain HTML tags into their entity versions.
array_merge()
htmlspecialchars()
Warning
octal
9. Variable names cannot begin with _______
numbers
index
ini_set ('display_errors', 1)
array()
10. searches the subject for matches to a given pattern replaced with the given replacement text
===
control structure
DTD
preg_replace()
11. This error refers to a variable with no value.
define()
Error
Notice
string
12. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
indexed array
integer
include() and require()
$_REQUEST
13. Used to display errors in a particular script - should be placed at top of script.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
14. Shorthand used to increment and decrement
predefined
double quotes
urlencode()
$var++ and $var
15. Tag to end a php script
XOR
boolean
define()
?>
16. To merge arrays
SEO
SGML
array_merge()
control structure
17. This will not show error reporting - it will be turned off.
string
string
error_reporting (0)
POST
18. Asynchronous Javascript And XML
nl2br()
superglobal
is_numeric()
AJAX
19. The concatenation assignment operator?
.=
fopen()
strlen()
function
20. To sort by the keys while maintaining the correlation between the key and its value
trim()
ksort()
for ($i = 0; $i < count($array); $i++) {statement(s);}
parentheses
21. This will show all error reporting.
error_reporting (E_ALL)
numbers
strlen()
Magic Constant
22. Returns a string with backslashes in front of predefined characters
urlencode()
numbers
addslashes()
mysql_close($dbc)
23. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
SGML
fopen()
indexed array
24. signed integer
int
underscores
Warning
htmlspecialchars()
25. Returns a character from a specified ASCII value
chr()
array()
Warning
function
26. a database which is best supported by PHP
mysql
Constant
the dollar sign $
XOR
27. Control structures that break exit
array()
wordwrap()
include() and require()
if/elseif/else and switch statements
28. bitwise left shift
shuffle()
if/elseif/else and switch statements
round() Function
<<
29. To word wrap after a certain amount of characters.
$dbc = mysql_connect(hostname, username, password)
wordwrap()
DTD
>>
30. Standard Generalized Markup Language
function error_reporting()
WYSIWYG
curly braces; ${$total}
SGML
31. Define(NAME,value)
0
Constant
AJAX
$$
32. The four main error types are:Notice - Warning - ________ and Error.
negative numbers
Parse error
int
str_word_count()
33. standard notation
decimal
error_reporting (E_ALL | E_STRICT)
substr_count()
string
34. bitwise XOR
^
htmlspecialchars()
foreach
list()
35. function Function used to create a random number
rand()
addcslashes()
echo
octal
36. the most basic function in PHP used to output information to the page
mysql_fetch_array()
mysql_close($dbc)
echo
^
37. To counter htmlentities()
$array[] = item
$_POST[]
trim()
html_entity_decode()
38. To find how many substrings are in a string
$_REQUEST
substr_count()
loops
define()
39. Use ______ when a variable contains any amount of variables; in general.
double quotes
substr_count()
?>
Hex
40. Converts a string of ASCII characters to hexadecimal values
bin2hex()
control structure
XML
variable
41. Hyper Text Transfer Protocol
Error
==
HTTP
isset()
42. This fatal error arises from memory allocation problem.
Error
curly braces
$_REQUEST
indexed array
43. To assign array element values to individual variables
define()
XML
list()
octal
44. Use ________ to have multiple quotations in one string
single quotes
the escape character ''
mysql
?>
45. All variables must begin with _________.
predefined variable
the dollar sign $
array()
boolean
46. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
define()
statement
htmlspecialchars()
nl2br()
47. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
predefined
POST
<<
array()
48. An array of variables passed in the URL
parentheses
echo
$_GET[]
shuffle()
49. To create an array
date()
strip_tags()
Array
array()
50. says 'if' this then do this 'else' do this or 'while' this do this
Warning
addslashes()
XML
statement