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. Document Type Definitions
boolean
DTD
variable
$$
2. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
Warning
control structure
Object
3. To iterate over the keys and values of an array
str_ireplace()
foreach loop
preg_match()
string
4. print $_SERVER will _____ work if you use the print function on arrays.
string
abs()
nl2br()
not
5. allows you to split strings based on more complex rules
bin2hex()
Shebang
preg_split()
Hex
6. Used to check if a variable has any value (including 0 or FALSE or an empty string).
not
empty()
round() Function
isset()
7. $_POST Data sent using POST found is sent to _______
predefined variable
==
GET
server-side programing
8. To reorganise the array randomly
shuffle()
htmlentities()
$array[] = item
asort()
9. Variable names cannot begin with _______
date()
define()
server-side programing
numbers
10. 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
11. To include files - _______ will give errors and _________ will terminate execution().
true
$_REQUEST
include() and require()
!= inequality
12. Used to encrypt values - it is a one-way encryption method
predefined
error_reporting (0)
statement
crypt()
13. To sort values of an array in reversed order
rsort()
Error
double quotes
decimal
14. Hyper Text Transfer Protocol
Magic Constant
htmlentities()
HTTP
DTD
15. Function that contains the highest value that rand() can have randomly
getrandmax()
ASP
foreach
date()
16. Leading 0x: 0x13F or 0xA23
nl2br()
Hex
chr()
superglobal
17. The three types of loops in PHP are: for - while - ____.
sql
drop
foreach
addslashes()
18. To assign keys to the values in an array
superglobal
array()
list()
Parse error
19. Operators used to operate and assign
defined()
$array[] = item
+= or -= or *= or /=
chr()
20. _________ can be used in conditional statements to set precedence
parentheses
Constant
nl2br()
HTTP
21. any programing language where the user must support the language the script is written in
date()
client-side programing
strtok()
!= inequality
22. says 'if' this then do this 'else' do this or 'while' this do this
string
list()
statement
$_REQUEST
23. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
the period; .
open source
Warning
24. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
shuffle()
floor()
Shebang
25. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
decimal
general
Parse error
strtok()
26. Uses two arguments: constant name and constant definition
integer
server-side programing
define()
boolean
27. a line of information that can be stored in a variable or used in a function or statement
Hex
shuffle()
string
variable
28. The name of the #! used to designate the location of the PHP binary
mysql
substr_count()
Shebang
server-side programing
29. This error arises from misusing a function.
preg_split()
&
ksort()
Warning
30. The syntax for connecting to a database
double quotes
$dbc = mysql_connect(hostname, username, password)
mysql
$_REQUEST
31. Use ______ when a variable contains any amount of variables; in general.
isset()
integer
double quotes
true
32. TRUE or FALSE
not
HTTP
defined()
boolean
33. Returns a string with backslashes in front of the specified characters
empty()
addcslashes()
loops
number_format()
34. An array of variables passed in the URL
$_GET[]
server-side programing
empty()
fopen()
35. Control structures that break exit
if/elseif/else and switch statements
array_merge()
Notice
&
36. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
chop()
integer
mysql
mysql_fetch_array()
37. This error refers to a variable with no value.
strtok()
Notice
curly braces; ${$total}
defined()
38. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
predefined
empty()
reassign
curly braces
39. Asynchronous Javascript And XML
1
Object
AJAX
null
40. Shorthand used to increment and decrement
bin2hex()
control structure
$var++ and $var
string
41. This fatal error arises from memory allocation problem.
chr()
?>
Error
nl2br()
42. The array that stores variables specific to a user's visit
XML
array
$_SESSION[]
for ($i = 0; $i < count($array); $i++) {statement(s);}
43. Use ______ when there are no variables in the string
predefined variable
single quotes
strip_tags()
mysql_fetch_array()
44. To refer to an item in an array
$varname[key]
the escape character ''
the period; .
null
45. To determine the amount of elements in an array
associative array
$_SESSION[]
count()
urlencode()
46. a type with two possible values: true and false
ini_set ('display_errors', 1)
boolean
ASP
superglobal
47. A data structure that can hold a number of items of data of the same type eg. a list of names
htmlspecialchars()
echo
Error
array
48. Used to convert all HTML tags into their entity versions.
error_reporting (0)
precedence
integer
htmlentities()
49. a language in which to make querys to a database with
Parse error
parentheses
sql
error_reporting (E_ALL)
50. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
.=
array()
HTML