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. Variable names cannot begin with _______
$_POST[]
boolean
numbers
array()
2. 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
3. Returns a character from a specified ASCII value
wordwrap()
chr()
decimal
predefined
4. An array of variables passed in the URL
curly braces
$_GET[]
$var++ and $var
error_reporting (E_ALL | E_STRICT)
5. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
===
superglobal
Magic Constant
drop
6. Returns a string with backslashes in front of the specified characters
null
single quotes
the period; .
addcslashes()
7. To word wrap after a certain amount of characters.
wordwrap()
the dollar sign $
html_entity_decode()
===
8. To check if a constant is already declared
date()
str_ireplace()
^
defined()
9. This will show all error reporting.
ksort()
predefined
open source
error_reporting (E_ALL)
10. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
<<
round() Function
general
string
11. $_SERVER is a ________ variable.
shuffle()
Notice
preg_split()
predefined
12. leading zero: 0100 or 0567
date()
arsort()
floor()
octal
13. To sort by the keys while maintaining the correlation between the key and its value
strip_tags()
+= or -= or *= or /=
ksort()
unset()
14. A data structure that can hold a number of items of data of the same type eg. a list of names
preg_match()
ini_set ('display_errors', 1)
array
1
15. bitwise right shift
preg_split()
>>
error_reporting (E_ALL)
general
16. To iterate over the keys and values of an array
define()
error_reporting (E_ALL)
open source
foreach loop
17. Hyper Text Transfer Protocol
curly braces
mysql_close($dbc)
HTTP
string
18. To find how many substrings are in a string
substr_count()
$_POST[]
<<
crypt()
19. identity
boolean
===
numbers
null
20. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
html_entity_decode()
function
error_reporting (0)
21. To get over quotation marks while using arrays
ini_set ('display_errors', 1)
number_format()
curly braces
switch
22. Uses two arguments: constant name and constant definition
mysql
Notice
wordwrap()
define()
23. A conditional or loop is a ________________.
control structure
HTTP
index
rsort()
24. used to round numeric values.
mysql_close($dbc)
the period; .
round() Function
Parse error
25. Used to check if a variable has any value (including 0 or FALSE or an empty string).
define()
count()
isset()
predefined
26. Leading 0x: 0x13F or 0xA23
$var++ and $var
parentheses
substr_count()
Hex
27. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
fopen()
string
$_REQUEST
POST
28. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
>>
sql
for ($i = 0; $i < count($array); $i++) {statement(s);}
29. When used the value can be passed safely through the URL (GET).
Parse error
mysql
if/elseif/else and switch statements
urlencode()
30. This error refers to a variable with no value.
asort()
Notice
for ($i = 0; $i < count($array); $i++) {statement(s);}
sql
31. To include files - _______ will give errors and _________ will terminate execution().
0
include() and require()
integer
bin2hex()
32. either hasn't yet been set or is assigned NULL value
nl2br()
null
boolean
reassign
33. This error arises from misusing a function.
the period; .
Hex
drop
Warning
34. To set up error reporting
GET
function error_reporting()
double quotes
XML
35. TRUE or FALSE
integer
boolean
float
include() and require()
36. To sort the values while maintaining the correlation between each value and its key - in reversed order
null
strip_tags()
0
arsort()
37. Used to create a substring (referred to as a token) from a larger string
Error
strtok()
number_format()
strlen()
38. Use ______ when a variable contains any amount of variables; in general.
XML
str_word_count()
double quotes
not
39. a positive or negative number
$dbc = mysql_connect(hostname, username, password)
wordwrap()
Constant
integer
40. To merge arrays
mysql_fetch_object()
array_merge()
octal
rand()
41. This will show all error reporting except for notice errors.
strip_tags()
str_word_count()
error_reporting (E_ALL & -E_NOTICE)
round() Function
42. Used to replace a substring with another string - it is not case-sensitive.
^
str_ireplace()
XML
Parse error
43. function Function used to create a random number
the period; .
rand()
nl2br()
define()
44. 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.
isset()
htmlspecialchars()
error_reporting (E_ALL | E_STRICT)
predefined variable
45. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
<<
GET
ini_set ('display_errors', 1)
mysql_fetch_array()
46. _____ is a logical operator
XOR
boolean
statement
str_word_count()
47. An array whose keys are numbers.
double quotes
indexed array
reassign
mysql_fetch_array()
48. The ouput of var_export((bool)"NULL");
define()
predefined
HTML
true
49. Variable names can begin with __________
underscores
superglobal
Magic Constant
$_POST[]
50. To remove all HTML and PHP tags.
switch
SGML
strip_tags()
define()