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 refer to an element in a multidimensional array list the indices in order of _____ to more precise;
preg_replace()
define()
general
reassign
2. equivalence
int
==
$array[] = item
strtok()
3. print $_SERVER will _____ work if you use the print function on arrays.
int
not
Hex
Magic Constant
4. Used to check if a variable has a valid numerical value; strings with numerical values pass.
associative array
switch
is_numeric()
statement
5. A data structure that can hold a number of items of data of the same type eg. a list of names
$varname[key]
array
^
$_SESSION[]
6. Used to encrypt values - it is a one-way encryption method
+
ini_set ('display_errors', 1)
crypt()
trim()
7. To sort values of an array without regard to the keys
empty()
sort()
bin2hex()
if/elseif/else and switch statements
8. Control structures that break exit
if/elseif/else and switch statements
SEO
indexed array
defined()
9. The concatenation operator?
urlencode()
the period; .
error_reporting (E_ALL | E_STRICT)
null
10. Used to replace a substring with another string - it is not case-sensitive.
the escape character ''
str_ireplace()
not
E_STRICT
11. An array of variables passed with <input /> data
htmlentities()
$_POST[]
1
strtok()
12. either hasn't yet been set or is assigned NULL value
true
null
if/elseif/else and switch statements
mysql_fetch_array()
13. An array whose keys are strings; also known as a hash.
WYSIWYG
array
associative array
ini_set ('display_errors', 1)
14. What You See Is What You Get
open source
mysql_fetch_array()
WYSIWYG
string
15. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
error_reporting (0)
<<
open source
16. bitwise right shift
chop()
>>
indexed array
XOR
17. To remove all HTML and PHP tags.
open source
unset()
strip_tags()
==
18. a database which is best supported by PHP
mysql
preg_replace()
htmlentities()
arsort()
19. Function used to round up to the highest integer
ceil()
index
error_reporting (E_ALL & -E_NOTICE)
include() and require()
20. Function can you use to format a number with commas
precedence
number_format()
mysql_fetch_array()
error_reporting (E_ALL | E_STRICT)
21. This fatal error arises from memory allocation problem.
int
number_format()
Error
>>
22. Function used to round down to the lowest integer
Parse error
floor()
error_reporting (E_ALL & -E_NOTICE)
addcslashes()
23. Use ________ to have multiple quotations in one string
fopen()
the escape character ''
Object
predefined
24. $_SERVER is a ________ variable.
the period; .
$_REQUEST
predefined
&
25. Uses two arguments: constant name and constant definition
boolean
control structure
getrandmax()
define()
26. returns the number of matches found by a given search string under this format...
preg_match()
index
underscores
not
27. Used to create a substring (referred to as a token) from a larger string
strtok()
int
crypt()
Array
28. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
array()
decimal
function
29. To find how many substrings are in a string
Object
function
substr_count()
$$
30. Used to find the length of a string
include() and require()
int
mysql_fetch_array()
strlen()
31. _________ can be used in conditional statements to set precedence
str_word_count()
Magic Constant
parentheses
rsort()
32. used to round numeric values.
indexed array
round() Function
index
not
33. To assign keys to the values in an array
E_STRICT
string
array()
str_word_count()
34. a language in which to make querys to a database with
error_reporting (E_ALL)
foreach
sql
mysql_fetch_array()
35. This will not show error reporting - it will be turned off.
include() and require()
boolean
sql
error_reporting (0)
36. To declare a constant
predefined
empty()
$_GET[]
define()
37. function Function used to create a random number
precedence
rand()
variable
&
38. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
0
variable
the dollar sign $
$array[] = item
39. _____ is a logical operator
client-side programing
shuffle()
general
XOR
40. The order of operations.
mysql_close($dbc)
Magic Constant
precedence
chr()
41. a storage location in the computer's memory that has a type & a name and a contents
mysql_close($dbc)
variable
switch
empty()
42. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
reassign
sort()
indexed array
43. addition
function error_reporting()
curly braces
+
SGML
44. To close a connection between a database
preg_match()
>>
Constant
mysql_close($dbc)
45. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
.=
round() Function
preg_match()
nl2br()
46. To sort the values while maintaining the correlation between each value and its key - in reversed order
Hex
arsort()
addslashes()
$_REQUEST
47. signed integer
mysql_fetch_array()
$_REQUEST
int
POST
48. 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}
count()
for ($i = 0; $i < count($array); $i++) {statement(s);}
mysql_fetch_object()
49. To word wrap after a certain amount of characters.
mysql
E_STRICT
single quotes
wordwrap()
50. TRUE or FALSE
error_reporting (E_ALL)
predefined
boolean
$var++ and $var