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 sort values of an array in reversed order
str_word_count()
mysql_fetch_object()
int
rsort()
2. ___________ can be used with substr() to count backward
string
strtok()
negative numbers
predefined
3. allows you to split strings based on more complex rules
preg_split()
underscores
empty()
ASP
4. To sort by the keys while maintaining the correlation between the key and its value
precedence
ASP
ksort()
$_SESSION[]
5. Function can you use to format a number with commas
Shebang
number_format()
fopen()
addslashes()
6. To counter htmlentities()
html_entity_decode()
foreach
null
$dbc = mysql_connect(hostname, username, password)
7. An array of variables passed with <input /> data
numbers
$varname[key]
$_POST[]
mysql
8. Control structures that break exit
AJAX
chop()
wordwrap()
if/elseif/else and switch statements
9. An array whose keys are strings; also known as a hash.
associative array
control structure
E_STRICT
curly braces
10. To check if a constant is already declared
fopen()
defined()
float
the dollar sign $
11. searches the subject for matches to a given pattern replaced with the given replacement text
SGML
preg_replace()
$_REQUEST
define()
12. signed integer
int
Notice
array()
underscores
13. To sort values of an array without regard to the keys
sort()
Constant
?>
$$
14. To iterate over the values of an array
floor()
rand()
substr_count()
for ($i = 0; $i < count($array); $i++) {statement(s);}
15. says 'if' this then do this 'else' do this or 'while' this do this
include() and require()
statement
predefined
echo
16. To reorganise the array randomly
wordwrap()
defined()
string
shuffle()
17. Used to find the length of a string
numbers
strlen()
array_merge()
XOR
18. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
SGML
0
general
mysql_close($dbc)
19. To merge arrays
str_ireplace()
htmlspecialchars()
array_merge()
predefined
20. used to round numeric values.
reassign
chr()
SGML
round() Function
21. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
trim()
>>
not
POST
22. To word wrap after a certain amount of characters.
wordwrap()
Shebang
preg_split()
floor()
23. This will show all error reporting.
XML
parentheses
$varname[key]
error_reporting (E_ALL)
24. function Function used to create a random number
Parse error
getrandmax()
rand()
arsort()
25. Variable names can begin with __________
superglobal
underscores
mysql_fetch_array()
mysql_close($dbc)
26. To get time data
date()
mysql_fetch_array()
str_word_count()
string
27. bitwise XOR
$varname[key]
client-side programing
^
defined()
28. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
Parse error
addcslashes()
string
str_word_count()
29. Used to check if a variable has a valid numerical value; strings with numerical values pass.
+= or -= or *= or /=
error_reporting (E_ALL | E_STRICT)
is_numeric()
curly braces
30. Asynchronous Javascript And XML
server-side programing
date()
Parse error
AJAX
31. Function used to round up to the highest integer
mysql_close($dbc)
>>
ceil()
strtok()
32. This error arises from misusing a function.
round() Function
include() and require()
str_word_count()
Warning
33. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
Array
$_SESSION[]
SGML
34. $_SERVER is a ________ variable.
rand()
mysql_fetch_object()
$$
predefined
35. 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 __________.
string
curly braces; ${$total}
GET
HTML
36. signed floating-point value
abs()
<<
unset()
float
37. PHP has two conditional: if and ______.
$$
int
switch
chop()
38. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
int
ini_set ('display_errors', 1)
Shebang
39. a line of information that can be stored in a variable or used in a function or statement
Hex
Constant
string
predefined
40. Control structure that continue exit - they perform specific statements for a determined number of iterations.
ceil()
double quotes
loops
>>
41. container of ordered data elements
octal
Error
DTD
Array
42. The output of var_export((float)array());
?>
0
addcslashes()
indexed array
43. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
addslashes()
$dbc = mysql_connect(hostname, username, password)
server-side programing
44. This fatal error arises from memory allocation problem.
Error
predefined
?>
crypt()
45. Tag to end a php script
negative numbers
?>
Parse error
strtok()
46. To iterate over the keys and values of an array
foreach loop
abs()
arsort()
negative numbers
47. container of both data and code
drop
octal
Object
array
48. a type with two possible values: true and false
predefined variable
boolean
control structure
strip_tags()
49. To assign array element values to individual variables
integer
list()
underscores
$_SESSION[]
50. 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.
variable
error_reporting (E_ALL | E_STRICT)
$varname[key]
control structure