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. Used to convert all HTML tags into their entity versions.
ksort()
addcslashes()
$array[] = item
htmlentities()
2. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
Magic Constant
fopen()
abs()
3. equivalence
variable
strlen()
boolean
==
4. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
Constant
getrandmax()
>>
mysql_fetch_array()
5. print $_SERVER will _____ work if you use the print function on arrays.
not
underscores
!= inequality
function
6. TRUE or FALSE
isset()
ASP
superglobal
boolean
7. To close a connection between a database
echo
mysql_close($dbc)
ini_set ('display_errors', 1)
str_word_count()
8. To assign array element values to individual variables
list()
boolean
foreach loop
string
9. The order of operations.
Magic Constant
isset()
precedence
boolean
10. Used to find the length of a string
mysql_close($dbc)
ceil()
error_reporting (E_ALL | E_STRICT)
strlen()
11. Function used to round down to the lowest integer
date()
Shebang
SEO
floor()
12. 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
13. 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.
for ($i = 0; $i < count($array); $i++) {statement(s);}
error_reporting (E_ALL | E_STRICT)
XOR
loops
14. Search Engine Optimization
SEO
include() and require()
^
E_STRICT
15. Control structure that continue exit - they perform specific statements for a determined number of iterations.
defined()
$_POST[]
loops
!= inequality
16. _________ can be used in conditional statements to set precedence
defined()
predefined variable
$varname[key]
parentheses
17. Standard Generalized Markup Language
octal
SGML
PHP
defined()
18. The concatenation assignment operator?
.=
underscores
fopen()
$_REQUEST
19. To determine the amount of elements in an array
count()
list()
fopen()
variable
20. To word wrap after a certain amount of characters.
octal
GET
wordwrap()
array
21. This will not show error reporting - it will be turned off.
error_reporting (0)
superglobal
$_GET[]
sort()
22. any programing language where the user must support the language the script is written in
client-side programing
SGML
the dollar sign $
htmlentities()
23. Use ______ when there are no variables in the string
server-side programing
predefined
the dollar sign $
single quotes
24. An array of variables passed with <input /> data
$_POST[]
statement
array_merge()
sort()
25. The array that stores variables specific to a user's visit
$_SESSION[]
superglobal
getrandmax()
true
26. This fatal error arises from memory allocation problem.
Error
isset()
0
bin2hex()
27. $_SERVER is a ________ variable.
predefined
single quotes
1
float
28. To reset an array _______ the array() function to the array
reassign
isset()
chop()
string
29. To set up error reporting
function error_reporting()
boolean
mysql_fetch_object()
defined()
30. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
list()
client-side programing
string
$array[] = item
31. To reorganise the array randomly
array
E_STRICT
shuffle()
switch
32. Active Server Pages
$var++ and $var
reassign
1
ASP
33. signed floating-point value
number_format()
float
string
$varname[key]
34. Leading 0x: 0x13F or 0xA23
Hex
integer
server-side programing
general
35. To create an array
preg_split()
.=
ceil()
array()
36. The ouput of var_export((bool)"NULL");
true
$array[] = item
substr_count()
mysql
37. To delete a variable or an element of an array
Error
defined()
ASP
unset()
38. Shorthand used to increment and decrement
floor()
<<
$var++ and $var
htmlspecialchars()
39. A data structure that can hold a number of items of data of the same type eg. a list of names
array
preg_match()
Error
statement
40. allows you to split strings based on more complex rules
statement
GET
^
preg_split()
41. The syntax for connecting to a database
fopen()
$dbc = mysql_connect(hostname, username, password)
drop
wordwrap()
42. To sort by the keys while maintaining the correlation between the key and its value
open source
HTML
ksort()
str_word_count()
43. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
$array[] = item
GET
underscores
+
44. Used to convert certain HTML tags into their entity versions.
foreach
htmlspecialchars()
echo
control structure
45. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
empty()
array
$_POST[]
POST
46. searches the subject for matches to a given pattern replaced with the given replacement text
Constant
Magic Constant
preg_replace()
array()
47. Returns a string with backslashes in front of the specified characters
superglobal
^
PHP
addcslashes()
48. used to round numeric values.
array
round() Function
Hex
array_merge()
49. Used to check if a variable has a valid numerical value; strings with numerical values pass.
floor()
boolean
is_numeric()
sql
50. Alias of rtrim()
HTML
htmlspecialchars()
Notice
chop()