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 find the amount of words in a string.
str_word_count()
strlen()
mysql_fetch_object()
strip_tags()
2. collection of binary data
precedence
$_POST[]
error_reporting (E_ALL | E_STRICT)
string
3. Function that contains the highest value that rand() can have randomly
0
getrandmax()
round() Function
array
4. To sort values of an array without regard to the keys
Object
sort()
foreach
ini_set ('display_errors', 1)
5. The ouput of var_export((bool)"NULL");
true
mysql
decimal
===
6. To find how many substrings are in a string
$_POST[]
curly braces
substr_count()
function error_reporting()
7. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
parentheses
mysql_fetch_array()
Parse error
crypt()
8. function Function used to create a random number
abs()
1
rand()
Notice
9. Returns a string with backslashes in front of the specified characters
addcslashes()
unset()
ASP
define()
10. Document Type Definitions
the period; .
DTD
not
function error_reporting()
11. $_POST Data sent using POST found is sent to _______
boolean
chr()
predefined variable
int
12. To close a connection between a database
mysql_close($dbc)
error_reporting (E_ALL)
array()
preg_split()
13. To iterate over the keys and values of an array
AJAX
Notice
numbers
foreach loop
14. Used to convert all HTML tags into their entity versions.
E_STRICT
$varname[key]
htmlentities()
>>
15. To assign array element values to individual variables
Notice
list()
boolean
strip_tags()
16. The syntax for connecting to a database
associative array
define()
$dbc = mysql_connect(hostname, username, password)
0
17. All variables must begin with _________.
null
open source
list()
the dollar sign $
18. standard notation
Object
decimal
addcslashes()
urlencode()
19. Function used to round down to the lowest integer
DTD
define()
floor()
string
20. container of ordered data elements
statement
date()
Array
strip_tags()
21. This error refers to a variable with no value.
function
Notice
mysql_fetch_array()
Constant
22. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
foreach
POST
list()
fopen()
23. This will not show error reporting - it will be turned off.
asort()
error_reporting (0)
mysql_fetch_array()
predefined variable
24. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
chr()
$var++ and $var
mysql_fetch_array()
==
25. print $_SERVER will _____ work if you use the print function on arrays.
if/elseif/else and switch statements
empty()
+
not
26. a line of information that can be stored in a variable or used in a function or statement
Error
string
htmlspecialchars()
htmlentities()
27. says 'if' this then do this 'else' do this or 'while' this do this
decimal
chr()
if/elseif/else and switch statements
statement
28. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
HTML
$varname[key]
DTD
Magic Constant
29. An array of variables passed with <input /> data
$_POST[]
abs()
chop()
htmlspecialchars()
30. Tag to begin a php script
GET
<?php
echo
foreach
31. container of both data and code
Object
+
html_entity_decode()
error_reporting (E_ALL)
32. the most basic function in PHP used to output information to the page
boolean
error_reporting (E_ALL & -E_NOTICE)
echo
for ($i = 0; $i < count($array); $i++) {statement(s);}
33. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
Hex
Parse error
negative numbers
34. To sort values of an array in reversed order
rsort()
addcslashes()
rand()
$array[] = item
35. To sort the values while maintaining the correlation between each value and its key - in reversed order
isset()
foreach
arsort()
array_merge()
36. To assign keys to the values in an array
$$
asort()
+= or -= or *= or /=
array()
37. _______ is a comparison operator
define()
$array[] = item
!= inequality
drop
38. Shorthand used to increment and decrement
mysql_fetch_object()
$var++ and $var
foreach loop
string
39. Used to find the length of a string
htmlspecialchars()
strlen()
ASP
Object
40. To get over quotation marks while using arrays
count()
trim()
curly braces
null
41. The output of var_export((float)array(0));
asort()
1
drop
wordwrap()
42. This will show all error reporting except for notice errors.
ini_set ('display_errors', 1)
error_reporting (E_ALL & -E_NOTICE)
$$
index
43. EXtensible Markup Language
the escape character ''
XML
getrandmax()
Array
44. Active Server Pages
ASP
$var++ and $var
$dbc = mysql_connect(hostname, username, password)
string
45. identity
open source
underscores
===
Shebang
46. Function used to round up to the highest integer
integer
chop()
ceil()
server-side programing
47. 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
48. 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.
+= or -= or *= or /=
urlencode()
error_reporting (E_ALL | E_STRICT)
bin2hex()
49. This error arises from misusing a function.
empty()
Warning
ksort()
Constant
50. The array that stores variables specific to a user's visit
associative array
$_SESSION[]
list()
error_reporting (E_ALL)