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. This error refers to a variable with no value.
true
===
?>
Notice
2. the most basic function in PHP used to output information to the page
echo
ini_set ('display_errors', 1)
integer
Warning
3. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
Notice
ini_set ('display_errors', 1)
parentheses
4. used to round numeric values.
round() Function
abs()
strip_tags()
drop
5. The prefix for a dynamic variable - also known as a variable variable
str_word_count()
ksort()
$$
abs()
6. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
urlencode()
switch
preg_split()
7. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
htmlentities()
E_STRICT
mysql_fetch_array()
Notice
8. $_POST and $_GET are ________ variables.
abs()
predefined
<<
int
9. To include files - _______ will give errors and _________ will terminate execution().
HTTP
GET
include() and require()
superglobal
10. The ouput of var_export((bool)"NULL");
indexed array
floor()
string
true
11. The syntax for connecting to a database
switch
$dbc = mysql_connect(hostname, username, password)
not
preg_match()
12. Hyper Text Markup Language
nl2br()
HTML
associative array
Notice
13. $_POST Data sent using POST found is sent to _______
Warning
htmlentities()
curly braces
predefined variable
14. To find how many substrings are in a string
htmlentities()
chop()
wordwrap()
substr_count()
15. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
&
preg_split()
nl2br()
variable
16. The name of the #! used to designate the location of the PHP binary
loops
number_format()
preg_match()
Shebang
17. a type with two possible values: true and false
isset()
boolean
mysql
unset()
18. a storage location in the computer's memory that has a type & a name and a contents
empty()
variable
for ($i = 0; $i < count($array); $i++) {statement(s);}
decimal
19. To refer to an item in an array
HTTP
urlencode()
$varname[key]
rsort()
20. Leading 0x: 0x13F or 0xA23
ASP
Magic Constant
str_ireplace()
Hex
21. Variable names can begin with __________
array()
ceil()
underscores
round() Function
22. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
variable
Array
indexed array
23. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
negative numbers
XML
Magic Constant
1
24. An array of variables passed with <input /> data
!= inequality
HTTP
$_POST[]
1
25. signed integer
==
sql
int
defined()
26. A conditional or loop is a ________________.
control structure
statement
0
for ($i = 0; $i < count($array); $i++) {statement(s);}
27. A data structure that can hold a number of items of data of the same type eg. a list of names
Error
array
sort()
===
28. identity
$dbc = mysql_connect(hostname, username, password)
loops
===
arsort()
29. Control structures that break exit
chop()
preg_split()
if/elseif/else and switch statements
server-side programing
30. Used to encrypt values - it is a one-way encryption method
rsort()
crypt()
parentheses
$_SESSION[]
31. To sort the values while maintaining the correlation between each value and its key
floor()
asort()
AJAX
array()
32. Function can you use to format a number with commas
function
getrandmax()
error_reporting (E_ALL)
number_format()
33. The array that stores variables specific to a user's visit
$_SESSION[]
HTTP
0
strtok()
34. any programing language where the script is parsed on the server
Constant
ceil()
server-side programing
foreach loop
35. To counter htmlentities()
shuffle()
numbers
$$
html_entity_decode()
36. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
0
arsort()
WYSIWYG
E_STRICT
37. either hasn't yet been set or is assigned NULL value
rsort()
the period; .
mysql_close($dbc)
null
38. $_SERVER is a ________ variable.
count()
predefined
reassign
octal
39. Variable names cannot begin with _______
numbers
switch
floor()
Notice
40. To iterate over the values of an array
asort()
preg_match()
for ($i = 0; $i < count($array); $i++) {statement(s);}
+
41. Document Type Definitions
XOR
&
DTD
$_REQUEST
42. Alias of rtrim()
strip_tags()
mysql
chop()
wordwrap()
43. _________ can be used in conditional statements to set precedence
function error_reporting()
number_format()
client-side programing
parentheses
44. Tag to end a php script
?>
for ($i = 0; $i < count($array); $i++) {statement(s);}
define()
>>
45. any programing language where the user must support the language the script is written in
array_merge()
client-side programing
$_REQUEST
Hex
46. Uses two arguments: constant name and constant definition
curly braces
^
define()
$_REQUEST
47. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
.=
rand()
HTTP
superglobal
48. Returns a string with backslashes in front of the specified characters
strip_tags()
addcslashes()
preg_split()
$array[] = item
49. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
client-side programing
rsort()
trim()
==
50. 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