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. $_SERVER is a ________ variable.
$varname[key]
mysql
true
predefined
2. To iterate over the keys and values of an array
strtok()
POST
true
foreach loop
3. Function used to round up to the highest integer
ceil()
strlen()
trim()
SEO
4. The array that stores variables specific to a user's visit
$_SESSION[]
curly braces
SGML
string
5. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
general
if/elseif/else and switch statements
decimal
WYSIWYG
6. Returns a string with backslashes in front of predefined characters
Array
negative numbers
mysql_close($dbc)
addslashes()
7. Used to find the length of a string
numbers
html_entity_decode()
octal
strlen()
8. To check if a constant is already declared
integer
array()
defined()
mysql_close($dbc)
9. Hypertext Preprocessor - a server-side programing language used to create webpages
null
underscores
mysql
PHP
10. EXtensible Markup Language
Parse error
Array
XML
DTD
11. To sort the values while maintaining the correlation between each value and its key
PHP
sql
asort()
1
12. This will show all error reporting.
open source
trim()
mysql_fetch_object()
error_reporting (E_ALL)
13. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
echo
<<
array()
14. Shorthand used to increment and decrement
floor()
SEO
client-side programing
$var++ and $var
15. a line of information that can be stored in a variable or used in a function or statement
error_reporting (E_ALL & -E_NOTICE)
list()
string
ini_set ('display_errors', 1)
16. $_POST Data sent using POST found is sent to _______
double quotes
parentheses
predefined variable
function error_reporting()
17. To determine the amount of elements in an array
mysql_fetch_array()
not
HTTP
count()
18. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
ASP
empty()
rand()
nl2br()
19. any programing language where the script is parsed on the server
for ($i = 0; $i < count($array); $i++) {statement(s);}
server-side programing
$_SESSION[]
^
20. Use ________ to have multiple quotations in one string
preg_split()
error_reporting (E_ALL)
the escape character ''
GET
21. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Warning
Magic Constant
Notice
str_ireplace()
22. allows you to split strings based on more complex rules
round() Function
preg_split()
getrandmax()
function
23. Active Server Pages
array_merge()
?>
arsort()
ASP
24. To sort values of an array in reversed order
sql
rsort()
error_reporting (E_ALL)
preg_match()
25. function Function used to create a random number
$_POST[]
rand()
crypt()
error_reporting (E_ALL & -E_NOTICE)
26. Function can you use to format a number with commas
general
number_format()
chr()
precedence
27. Tag to end a php script
not
Object
?>
predefined
28. Used to convert all HTML tags into their entity versions.
int
Hex
htmlentities()
str_word_count()
29. Used to encrypt values - it is a one-way encryption method
Magic Constant
AJAX
crypt()
chop()
30. To refer to an item in an array
function error_reporting()
$varname[key]
error_reporting (0)
strip_tags()
31. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
null
$_REQUEST
abs()
control structure
32. To word wrap after a certain amount of characters.
WYSIWYG
if/elseif/else and switch statements
Object
wordwrap()
33. 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)
variable
precedence
index
34. ___________ can be used with substr() to count backward
ceil()
strip_tags()
crypt()
negative numbers
35. collection of binary data
trim()
parentheses
string
<<
36. To find how many substrings are in a string
mysql_close($dbc)
substr_count()
strtok()
predefined
37. To sort values of an array without regard to the keys
===
htmlspecialchars()
sort()
rand()
38. the most basic function in PHP used to output information to the page
echo
indexed array
general
AJAX
39. To get time data
octal
chr()
date()
&
40. Define(NAME,value)
rsort()
underscores
Constant
Error
41. Operators used to operate and assign
+= or -= or *= or /=
octal
Object
nl2br()
42. To delete a variable or an element of an array
unset()
error_reporting (E_ALL | E_STRICT)
mysql_fetch_object()
arsort()
43. To include files - _______ will give errors and _________ will terminate execution().
>>
arsort()
null
include() and require()
44. Document Type Definitions
include() and require()
double quotes
DTD
Warning
45. _________ can be used in conditional statements to set precedence
parentheses
error_reporting (E_ALL)
open source
$var++ and $var
46. The three types of loops in PHP are: for - while - ____.
function error_reporting()
include() and require()
foreach
chop()
47. Asynchronous Javascript And XML
htmlentities()
$_POST[]
the dollar sign $
AJAX
48. a type with two possible values: true and false
open source
precedence
boolean
define()
49. To sort by the keys while maintaining the correlation between the key and its value
sql
PHP
ksort()
curly braces
50. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
empty()
nl2br()
error_reporting (E_ALL)
predefined