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. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
crypt()
E_STRICT
array_merge()
htmlentities()
2. Used to display errors in a particular script - should be placed at top of script.
3. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
empty()
abs()
the dollar sign $
integer
4. To get over quotation marks while using arrays
array()
curly braces
string
error_reporting (E_ALL & -E_NOTICE)
5. Returns a character from a specified ASCII value
chr()
predefined
Warning
+= or -= or *= or /=
6. To put a dollar sign before a variable like $10 where 10 is the variable's value - you can escape the first dollar sign; $$cost; or you can use __________.
!= inequality
variable
$_SESSION[]
curly braces; ${$total}
7. A data structure that can hold a number of items of data of the same type eg. a list of names
negative numbers
preg_split()
open source
array
8. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
control structure
POST
curly braces; ${$total}
string
9. Used to convert certain HTML tags into their entity versions.
$_SESSION[]
strtok()
htmlspecialchars()
decimal
10. Operators used to operate and assign
if/elseif/else and switch statements
+= or -= or *= or /=
chr()
double quotes
11. An array whose keys are strings; also known as a hash.
0
ini_set ('display_errors', 1)
associative array
numbers
12. Used to encrypt values - it is a one-way encryption method
$$
abs()
mysql_fetch_object()
crypt()
13. identity
E_STRICT
the escape character ''
===
int
14. To assign keys to the values in an array
array()
foreach loop
array
mysql_fetch_object()
15. To determine the amount of elements in an array
===
Shebang
getrandmax()
count()
16. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
getrandmax()
nl2br()
$varname[key]
curly braces
17. The output of var_export((float)array());
0
E_STRICT
error_reporting (0)
<?php
18. returns the number of matches found by a given search string under this format...
date()
null
Warning
preg_match()
19. print $_SERVER will _____ work if you use the print function on arrays.
XML
not
predefined
reassign
20. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
error_reporting (E_ALL | E_STRICT)
Parse error
addcslashes()
htmlspecialchars()
21. container of both data and code
+
Object
substr_count()
$var++ and $var
22. The concatenation operator?
if/elseif/else and switch statements
string
mysql
the period; .
23. To assign array element values to individual variables
abs()
list()
HTTP
str_word_count()
24. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
HTTP
preg_match()
Magic Constant
drop
25. $_POST Data sent using POST found is sent to _______
date()
+= or -= or *= or /=
.=
predefined variable
26. To set up error reporting
general
wordwrap()
error_reporting (E_ALL)
function error_reporting()
27. Returns a string with backslashes in front of the specified characters
drop
1
parentheses
addcslashes()
28. bitwise XOR
^
rsort()
array_merge()
SEO
29. To sort the values while maintaining the correlation between each value and its key - in reversed order
foreach loop
arsort()
sql
urlencode()
30. An array of variables passed in the URL
<<
precedence
not
$_GET[]
31. Define(NAME,value)
Constant
Notice
mysql_fetch_object()
floor()
32. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
GET
drop
float
str_word_count()
33. allows you to split strings based on more complex rules
$var++ and $var
preg_split()
0
date()
34. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
defined()
POST
!= inequality
35. any programing language where the script is parsed on the server
$_REQUEST
AJAX
server-side programing
control structure
36. bitwise left shift
chop()
<<
Parse error
mysql_fetch_array()
37. The order of operations.
$varname[key]
trim()
precedence
?>
38. To create an array
$_REQUEST
floor()
defined()
array()
39. standard notation
addcslashes()
array_merge()
decimal
number_format()
40. To sort values of an array in reversed order
rsort()
HTTP
preg_match()
urlencode()
41. does a certain action when called upon
str_ireplace()
for ($i = 0; $i < count($array); $i++) {statement(s);}
function
loops
42. container of ordered data elements
str_word_count()
array()
SEO
Array
43. To sort by the keys while maintaining the correlation between the key and its value
Parse error
$_REQUEST
foreach
ksort()
44. addition
+
asort()
PHP
!= inequality
45. Returns a string with backslashes in front of predefined characters
addslashes()
the period; .
POST
substr_count()
46. The output of var_export((float)array(0));
sql
1
ceil()
?>
47. Hyper Text Markup Language
fopen()
mysql
PHP
HTML
48. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
reassign
fopen()
Parse error
49. searches the subject for matches to a given pattern replaced with the given replacement text
getrandmax()
preg_replace()
floor()
substr_count()
50. Used to check if a variable has any value (including 0 or FALSE or an empty string).
number_format()
array_merge()
error_reporting (E_ALL & -E_NOTICE)
isset()