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. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
Object
^
nl2br()
$varname[key]
2. Used to convert certain HTML tags into their entity versions.
htmlspecialchars()
string
the dollar sign $
numbers
3. 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 __________.
curly braces; ${$total}
integer
ksort()
SEO
4. $_POST Data sent using POST found is sent to _______
$_GET[]
predefined variable
$array[] = item
function
5. Used to convert all HTML tags into their entity versions.
htmlentities()
integer
error_reporting (E_ALL | E_STRICT)
$varname[key]
6. To reset an array _______ the array() function to the array
arsort()
addcslashes()
reassign
chr()
7. Hypertext Preprocessor - a server-side programing language used to create webpages
unset()
array_merge()
PHP
$_REQUEST
8. Returns a string with backslashes in front of predefined characters
round() Function
the dollar sign $
count()
addslashes()
9. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
Hex
chr()
true
10. Used to encrypt values - it is a one-way encryption method
double quotes
$_GET[]
crypt()
$_REQUEST
11. The syntax for connecting to a database
str_word_count()
associative array
$dbc = mysql_connect(hostname, username, password)
isset()
12. What You See Is What You Get
WYSIWYG
DTD
double quotes
rand()
13. Hyper Text Transfer Protocol
HTTP
$_GET[]
substr_count()
mysql_fetch_array()
14. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
mysql_close($dbc)
empty()
SGML
15. Control structures that break exit
if/elseif/else and switch statements
$array[] = item
preg_match()
error_reporting (E_ALL | E_STRICT)
16. Variable names can begin with __________
htmlentities()
Parse error
underscores
server-side programing
17. Uses two arguments: constant name and constant definition
$dbc = mysql_connect(hostname, username, password)
error_reporting (0)
switch
define()
18. says 'if' this then do this 'else' do this or 'while' this do this
unset()
integer
server-side programing
statement
19. To sort the values while maintaining the correlation between each value and its key
rsort()
urlencode()
the period; .
asort()
20. To iterate over the values of an array
$_POST[]
for ($i = 0; $i < count($array); $i++) {statement(s);}
predefined variable
control structure
21. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
XML
array_merge()
$_POST[]
22. Function can you use to format a number with commas
number_format()
strtok()
associative array
str_ireplace()
23. Shorthand used to increment and decrement
===
single quotes
$var++ and $var
ini_set ('display_errors', 1)
24. To remove all HTML and PHP tags.
strip_tags()
superglobal
error_reporting (E_ALL | E_STRICT)
function
25. TRUE or FALSE
boolean
error_reporting (E_ALL & -E_NOTICE)
ini_set ('display_errors', 1)
negative numbers
26. Function used to round up to the highest integer
error_reporting (0)
SGML
1
ceil()
27. Document Type Definitions
str_word_count()
chr()
DTD
client-side programing
28. EXtensible Markup Language
PHP
XML
wordwrap()
count()
29. This will not show error reporting - it will be turned off.
Hex
client-side programing
error_reporting (0)
getrandmax()
30. Hyper Text Markup Language
strlen()
HTML
Object
define()
31. Used to find the amount of words in a string.
sql
str_word_count()
predefined
echo
32. A conditional or loop is a ________________.
Magic Constant
control structure
strtok()
crypt()
33. PHP has two conditional: if and ______.
preg_replace()
switch
fopen()
round() Function
34. ___________ can be used with substr() to count backward
str_ireplace()
negative numbers
asort()
the dollar sign $
35. Tag to end a php script
statement
?>
predefined
Warning
36. returns the number of matches found by a given search string under this format...
int
preg_match()
preg_split()
statement
37. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
strip_tags()
$_REQUEST
str_word_count()
mysql_fetch_object()
38. Used to replace a substring with another string - it is not case-sensitive.
decimal
===
str_ireplace()
precedence
39. Alias of rtrim()
chop()
rand()
date()
crypt()
40. 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.
html_entity_decode()
Notice
error_reporting (E_ALL | E_STRICT)
!= inequality
41. any programing language where the user must support the language the script is written in
parentheses
client-side programing
arsort()
indexed array
42. The three types of loops in PHP are: for - while - ____.
foreach
float
isset()
Error
43. $_POST and $_GET are ________ variables.
sort()
predefined
octal
array()
44. _________ can be used in conditional statements to set precedence
preg_replace()
the escape character ''
htmlspecialchars()
parentheses
45. To assign keys to the values in an array
.=
>>
isset()
array()
46. Function used to find the absolute value of a number or numeric variable
asort()
empty()
abs()
+= or -= or *= or /=
47. To check if a constant is already declared
addslashes()
mysql_close($dbc)
precedence
defined()
48. Active Server Pages
strtok()
function
float
ASP
49. standard notation
array_merge()
decimal
underscores
sort()
50. The four main error types are:Notice - Warning - ________ and Error.
+
Parse error
negative numbers
$_GET[]