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. An array of variables passed with <input /> data
null
$_POST[]
true
+= or -= or *= or /=
2. To find how many substrings are in a string
>>
octal
substr_count()
^
3. Standard Generalized Markup Language
decimal
SGML
precedence
array()
4. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
$varname[key]
POST
server-side programing
integer
5. To get time data
foreach loop
date()
strtok()
$dbc = mysql_connect(hostname, username, password)
6. Used to check if a variable has any value (including 0 or FALSE or an empty string).
associative array
isset()
ceil()
HTTP
7. equivalence
abs()
==
list()
?>
8. Tag to end a php script
?>
float
empty()
array()
9. This will not show error reporting - it will be turned off.
string
general
error_reporting (0)
!= inequality
10. To check if a constant is already declared
crypt()
DTD
defined()
$dbc = mysql_connect(hostname, username, password)
11. The syntax for connecting to a database
ksort()
HTTP
SGML
$dbc = mysql_connect(hostname, username, password)
12. To declare a constant
statement
define()
foreach loop
is_numeric()
13. Define(NAME,value)
Constant
$_SESSION[]
precedence
.=
14. Returns a string with backslashes in front of predefined characters
addslashes()
Array
preg_match()
WYSIWYG
15. 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
16. Used to find the length of a string
open source
strlen()
AJAX
superglobal
17. identity
not
ASP
===
DTD
18. To assign keys to the values in an array
array()
foreach
addslashes()
server-side programing
19. $_POST and $_GET are ________ variables.
predefined
==
echo
number_format()
20. The three types of loops in PHP are: for - while - ____.
XOR
predefined
array
foreach
21. To close a connection between a database
double quotes
associative array
mysql_close($dbc)
date()
22. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
number_format()
DTD
null
23. container of ordered data elements
Array
define()
+
the period; .
24. The prefix for a dynamic variable - also known as a variable variable
nl2br()
addslashes()
reassign
$$
25. Use ________ to have multiple quotations in one string
negative numbers
the escape character ''
number_format()
Warning
26. Document Type Definitions
DTD
arsort()
Parse error
.=
27. An array whose keys are strings; also known as a hash.
$array[] = item
indexed array
superglobal
associative array
28. Leading 0x: 0x13F or 0xA23
Hex
error_reporting (E_ALL)
boolean
$var++ and $var
29. All variables must begin with _________.
double quotes
switch
the dollar sign $
HTML
30. container of both data and code
Object
reassign
include() and require()
&
31. Use ______ when there are no variables in the string
single quotes
array_merge()
strtok()
wordwrap()
32. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
$_SESSION[]
nl2br()
foreach loop
mysql_fetch_array()
33. searches the subject for matches to a given pattern replaced with the given replacement text
shuffle()
true
Array
preg_replace()
34. Variable names can begin with __________
?>
client-side programing
underscores
>>
35. The output of var_export((float)array());
+
0
POST
strlen()
36. $_SERVER is a ________ variable.
not
mysql_fetch_object()
predefined
general
37. A conditional or loop is a ________________.
string
strtok()
control structure
null
38. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
date()
preg_match()
index
39. ____ or key is referred to for a value within an array.
negative numbers
the dollar sign $
asort()
index
40. Shorthand used to increment and decrement
number_format()
mysql_fetch_object()
$var++ and $var
echo
41. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
float
curly braces
trim()
defined()
42. Used to check if a variable has a valid numerical value; strings with numerical values pass.
array
str_ireplace()
array()
is_numeric()
43. any programing language where the script is parsed on the server
Parse error
is_numeric()
Hex
server-side programing
44. To sort values of an array in reversed order
strlen()
^
Array
rsort()
45. Use ______ when a variable contains any amount of variables; in general.
precedence
?>
DTD
double quotes
46. signed floating-point value
float
reassign
XML
getrandmax()
47. This will show all error reporting.
nl2br()
null
+= or -= or *= or /=
error_reporting (E_ALL)
48. To sort by the keys while maintaining the correlation between the key and its value
wordwrap()
ksort()
mysql_fetch_array()
client-side programing
49. The four main error types are:Notice - Warning - ________ and Error.
empty()
strtok()
underscores
Parse error
50. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
general
Shebang
$_GET[]