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 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
2. To sort the values while maintaining the correlation between each value and its key - in reversed order
fopen()
sort()
defined()
arsort()
3. A conditional or loop is a ________________.
foreach loop
?>
control structure
unset()
4. To sort the values while maintaining the correlation between each value and its key
asort()
array
unset()
curly braces
5. To word wrap after a certain amount of characters.
parentheses
wordwrap()
str_ireplace()
if/elseif/else and switch statements
6. Converts a string of ASCII characters to hexadecimal values
bin2hex()
preg_replace()
mysql
addslashes()
7. When used the value can be passed safely through the URL (GET).
Constant
urlencode()
htmlentities()
addcslashes()
8. The name of the #! used to designate the location of the PHP binary
chr()
trim()
Shebang
error_reporting (E_ALL & -E_NOTICE)
9. collection of binary data
single quotes
AJAX
string
$varname[key]
10. Tag to begin a php script
date()
mysql_fetch_object()
WYSIWYG
<?php
11. Asynchronous Javascript And XML
predefined variable
AJAX
client-side programing
is_numeric()
12. To merge arrays
single quotes
&
array_merge()
AJAX
13. Use ______ when a variable contains any amount of variables; in general.
count()
$_GET[]
single quotes
double quotes
14. The ouput of var_export((bool)"NULL");
Parse error
ksort()
ini_set ('display_errors', 1)
true
15. _________ can be used in conditional statements to set precedence
string
trim()
parentheses
list()
16. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
Error
Warning
general
GET
17. To iterate over the values of an array
drop
error_reporting (E_ALL | E_STRICT)
for ($i = 0; $i < count($array); $i++) {statement(s);}
strip_tags()
18. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
0
ini_set ('display_errors', 1)
foreach loop
19. Used to encrypt values - it is a one-way encryption method
integer
crypt()
E_STRICT
round() Function
20. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
list()
arsort()
underscores
$_REQUEST
21. Control structures that break exit
decimal
defined()
HTTP
if/elseif/else and switch statements
22. function Function used to create a random number
rand()
variable
+= or -= or *= or /=
rsort()
23. Variable names can begin with __________
HTTP
floor()
substr_count()
underscores
24. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
curly braces; ${$total}
superglobal
wordwrap()
+
25. standard notation
isset()
decimal
Parse error
$$
26. print $_SERVER will _____ work if you use the print function on arrays.
isset()
urlencode()
not
Error
27. any programing language where the user must support the language the script is written in
ini_set ('display_errors', 1)
sql
client-side programing
<?php
28. bitwise AND
curly braces
mysql_close($dbc)
&
loops
29. This will show all error reporting except for notice errors.
wordwrap()
error_reporting (E_ALL & -E_NOTICE)
floor()
Shebang
30. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
$$
POST
empty()
the dollar sign $
31. either hasn't yet been set or is assigned NULL value
null
trim()
count()
function
32. EXtensible Markup Language
not
XML
rsort()
parentheses
33. the most basic function in PHP used to output information to the page
echo
WYSIWYG
mysql_fetch_object()
open source
34. This will show all error reporting.
$_GET[]
error_reporting (E_ALL)
switch
for ($i = 0; $i < count($array); $i++) {statement(s);}
35. Alias of rtrim()
==
strtok()
underscores
chop()
36. container of both data and code
Object
crypt()
str_word_count()
E_STRICT
37. Use ________ to have multiple quotations in one string
predefined
the escape character ''
statement
<<
38. Define(NAME,value)
<?php
Constant
unset()
index
39. Creates a pointer to a file with the declared mode (read - write -etc.).
variable
fopen()
rand()
error_reporting (E_ALL & -E_NOTICE)
40. Hyper Text Markup Language
+
parentheses
Hex
HTML
41. An array of variables passed with <input /> data
$_POST[]
HTML
index
preg_match()
42. identity
Constant
bin2hex()
htmlspecialchars()
===
43. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
POST
general
htmlspecialchars()
Parse error
44. Used to convert all HTML tags into their entity versions.
for ($i = 0; $i < count($array); $i++) {statement(s);}
htmlentities()
general
foreach
45. This error refers to a variable with no value.
Notice
POST
statement
not
46. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
trim()
function
predefined
47. Used to check if a variable has a valid numerical value; strings with numerical values pass.
Shebang
>>
is_numeric()
strlen()
48. To delete a variable or an element of an array
unset()
asort()
SGML
0
49. a positive or negative number
client-side programing
string
$varname[key]
integer
50. 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.
strip_tags()
error_reporting (E_ALL | E_STRICT)
empty()
server-side programing