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
mysql_fetch_array()
DTD
html_entity_decode()
Parse error
2. A data structure that can hold a number of items of data of the same type eg. a list of names
htmlentities()
round() Function
array
arsort()
3. 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)
predefined
count()
float
4. Function used to find the absolute value of a number or numeric variable
include() and require()
abs()
underscores
superglobal
5. The four main error types are:Notice - Warning - ________ and Error.
fopen()
predefined variable
decimal
Parse error
6. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
number_format()
loops
decimal
7. _______ is a comparison operator
mysql_close($dbc)
floor()
$$
!= inequality
8. Define(NAME,value)
Constant
echo
control structure
.=
9. To close a connection between a database
nl2br()
not
$$
mysql_close($dbc)
10. To delete a variable or an element of an array
underscores
ASP
unset()
==
11. This error arises from misusing a function.
$_REQUEST
foreach
Warning
POST
12. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
crypt()
===
integer
superglobal
13. When used the value can be passed safely through the URL (GET).
Array
wordwrap()
DTD
urlencode()
14. ____ or key is referred to for a value within an array.
error_reporting (E_ALL | E_STRICT)
number_format()
index
null
15. The name of the #! used to designate the location of the PHP binary
crypt()
Shebang
Array
mysql
16. To get over quotation marks while using arrays
Object
count()
curly braces
drop
17. To iterate over the keys and values of an array
foreach loop
$array[] = item
array()
is_numeric()
18. The output of var_export((float)array(0));
+
ini_set ('display_errors', 1)
1
POST
19. To word wrap after a certain amount of characters.
bin2hex()
predefined variable
wordwrap()
strtok()
20. says 'if' this then do this 'else' do this or 'while' this do this
arsort()
Hex
statement
variable
21. Variable names cannot begin with _______
getrandmax()
numbers
the dollar sign $
control structure
22. bitwise right shift
>>
string
list()
function error_reporting()
23. identity
arsort()
===
server-side programing
general
24. Used to encrypt values - it is a one-way encryption method
chr()
mysql_fetch_array()
html_entity_decode()
crypt()
25. To sort by the keys while maintaining the correlation between the key and its value
foreach
control structure
ksort()
open source
26. Used to check if a variable has a valid numerical value; strings with numerical values pass.
HTTP
mysql_close($dbc)
is_numeric()
single quotes
27. To counter htmlentities()
preg_split()
strtok()
html_entity_decode()
parentheses
28. leading zero: 0100 or 0567
octal
decimal
Shebang
Warning
29. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
drop
reassign
substr_count()
30. To check if a constant is already declared
Hex
drop
include() and require()
defined()
31. Function used to round up to the highest integer
===
$array[] = item
ceil()
preg_match()
32. a positive or negative number
predefined variable
integer
numbers
variable
33. Operators used to operate and assign
reassign
==
+= or -= or *= or /=
fopen()
34. Shorthand used to increment and decrement
1
error_reporting (E_ALL & -E_NOTICE)
$var++ and $var
date()
35. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
string
preg_match()
switch
36. This error refers to a variable with no value.
reassign
foreach loop
substr_count()
Notice
37. Returns a string with backslashes in front of predefined characters
nl2br()
control structure
urlencode()
addslashes()
38. any programing language where the user must support the language the script is written in
addcslashes()
error_reporting (E_ALL | E_STRICT)
include() and require()
client-side programing
39. To reorganise the array randomly
number_format()
variable
reassign
shuffle()
40. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
reassign
$array[] = item
function
empty()
41. To sort values of an array without regard to the keys
the dollar sign $
preg_split()
sort()
XOR
42. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
===
chop()
error_reporting (E_ALL & -E_NOTICE)
43. This will not show error reporting - it will be turned off.
parentheses
error_reporting (0)
^
echo
44. _____ is a logical operator
XOR
reassign
null
trim()
45. Hypertext Preprocessor - a server-side programing language used to create webpages
PHP
function error_reporting()
preg_split()
variable
46. Alias of rtrim()
addcslashes()
?>
empty()
chop()
47. To set up error reporting
^
function error_reporting()
error_reporting (E_ALL)
foreach
48. Tag to end a php script
preg_split()
?>
arsort()
count()
49. To refer to an item in an array
include() and require()
$varname[key]
mysql_close($dbc)
>>
50. container of ordered data elements
Array
isset()
>>
html_entity_decode()