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 by the keys while maintaining the correlation between the key and its value
ksort()
int
open source
preg_replace()
2. The concatenation assignment operator?
int
echo
.=
+= or -= or *= or /=
3. To sort the values while maintaining the correlation between each value and its key - in reversed order
index
Object
arsort()
Parse error
4. Used to encrypt values - it is a one-way encryption method
single quotes
foreach
is_numeric()
crypt()
5. used to round numeric values.
rsort()
round() Function
+
Magic Constant
6. The name of the #! used to designate the location of the PHP binary
error_reporting (0)
wordwrap()
str_word_count()
Shebang
7. An array of variables passed with <input /> data
$_POST[]
drop
underscores
associative array
8. To include files - _______ will give errors and _________ will terminate execution().
addslashes()
include() and require()
predefined
parentheses
9. To get over quotation marks while using arrays
superglobal
error_reporting (E_ALL)
curly braces
sort()
10. Uses two arguments: constant name and constant definition
underscores
define()
not
if/elseif/else and switch statements
11. Variable names can begin with __________
underscores
preg_match()
strip_tags()
isset()
12. says 'if' this then do this 'else' do this or 'while' this do this
^
addcslashes()
statement
mysql_fetch_object()
13. Used to convert certain HTML tags into their entity versions.
if/elseif/else and switch statements
decimal
unset()
htmlspecialchars()
14. _______ is a comparison operator
$_REQUEST
DTD
!= inequality
error_reporting (E_ALL | E_STRICT)
15. _________ can be used in conditional statements to set precedence
define()
?>
index
parentheses
16. signed floating-point value
float
predefined
predefined
reassign
17. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
addcslashes()
wordwrap()
trim()
18. addition
str_word_count()
parentheses
+
array()
19. The output of var_export((float)array());
sql
0
single quotes
function error_reporting()
20. The output of var_export((float)array(0));
1
switch
trim()
control structure
21. All variables must begin with _________.
true
the dollar sign $
mysql_fetch_array()
urlencode()
22. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
string
int
strtok()
23. The array that stores variables specific to a user's visit
switch
POST
floor()
$_SESSION[]
24. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
sql
associative array
superglobal
strip_tags()
25. Control structures that break exit
$varname[key]
if/elseif/else and switch statements
predefined
underscores
26. To merge arrays
mysql_fetch_array()
array_merge()
sort()
foreach loop
27. Use ______ when there are no variables in the string
single quotes
string
associative array
mysql_fetch_array()
28. equivalence
general
&
urlencode()
==
29. Used to find the length of a string
chop()
strlen()
curly braces; ${$total}
index
30. 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}
0
error_reporting (0)
general
31. ___________ can be used with substr() to count backward
drop
error_reporting (E_ALL & -E_NOTICE)
!= inequality
negative numbers
32. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
control structure
abs()
integer
E_STRICT
33. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
Object
bin2hex()
crypt()
mysql_fetch_object()
34. To refer to an item in an array
$varname[key]
Magic Constant
str_ireplace()
preg_replace()
35. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
substr_count()
$_POST[]
.=
$_REQUEST
36. To iterate over the values of an array
substr_count()
curly braces; ${$total}
Error
for ($i = 0; $i < count($array); $i++) {statement(s);}
37. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
strlen()
empty()
variable
+
38. PHP has two conditional: if and ______.
switch
true
WYSIWYG
foreach loop
39. 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.
error_reporting (E_ALL | E_STRICT)
>>
include() and require()
string
40. An array whose keys are numbers.
$varname[key]
indexed array
not
mysql_close($dbc)
41. Asynchronous Javascript And XML
Parse error
include() and require()
chr()
AJAX
42. Use ________ to have multiple quotations in one string
the escape character ''
Constant
true
error_reporting (E_ALL)
43. Used to find the amount of words in a string.
WYSIWYG
===
str_word_count()
round() Function
44. Online applications and resources which are available to the general public with very few restrictions
mysql_close($dbc)
echo
curly braces
open source
45. a type with two possible values: true and false
boolean
!= inequality
predefined
switch
46. A data structure that can hold a number of items of data of the same type eg. a list of names
AJAX
!= inequality
array
$$
47. ____ or key is referred to for a value within an array.
index
strlen()
Magic Constant
Constant
48. This will show all error reporting except for notice errors.
AJAX
error_reporting (E_ALL & -E_NOTICE)
parentheses
Constant
49. does a certain action when called upon
reassign
echo
function
mysql
50. To iterate over the keys and values of an array
foreach loop
$var++ and $var
XOR
strip_tags()