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. Variable names cannot begin with _______
numbers
array_merge()
ceil()
strlen()
2. Operators used to operate and assign
define()
mysql_fetch_array()
+= or -= or *= or /=
^
3. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
GET
str_ireplace()
E_STRICT
$_POST[]
4. To reorganise the array randomly
isset()
shuffle()
$varname[key]
error_reporting (E_ALL)
5. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
arsort()
int
$_REQUEST
integer
6. Define(NAME,value)
sql
include() and require()
Magic Constant
Constant
7. 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.
predefined
is_numeric()
error_reporting (E_ALL | E_STRICT)
preg_split()
8. Used to check if a variable has any value (including 0 or FALSE or an empty string).
define()
>>
isset()
^
9. any programing language where the script is parsed on the server
foreach loop
function
rsort()
server-side programing
10. What You See Is What You Get
if/elseif/else and switch statements
ini_set ('display_errors', 1)
WYSIWYG
mysql
11. To sort by the keys while maintaining the correlation between the key and its value
curly braces; ${$total}
!= inequality
fopen()
ksort()
12. searches the subject for matches to a given pattern replaced with the given replacement text
sort()
number_format()
array()
preg_replace()
13. To create an array
array()
error_reporting (E_ALL | E_STRICT)
+
$_SESSION[]
14. EXtensible Markup Language
foreach loop
XML
GET
curly braces; ${$total}
15. The order of operations.
Error
server-side programing
precedence
trim()
16. To sort values of an array in reversed order
rsort()
function
mysql_close($dbc)
predefined
17. Function used to find the absolute value of a number or numeric variable
ksort()
abs()
client-side programing
numbers
18. This error refers to a variable with no value.
DTD
the escape character ''
Notice
$_REQUEST
19. a storage location in the computer's memory that has a type & a name and a contents
numbers
nl2br()
variable
.=
20. addition
octal
1
+
Magic Constant
21. collection of binary data
reassign
string
addcslashes()
addslashes()
22. ____ or key is referred to for a value within an array.
$varname[key]
trim()
0
index
23. This error arises from misusing a function.
true
Warning
underscores
SGML
24. any programing language where the user must support the language the script is written in
WYSIWYG
predefined
addslashes()
client-side programing
25. equivalence
int
DTD
==
octal
26. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
POST
Shebang
floor()
mysql_fetch_object()
27. Variable names can begin with __________
include() and require()
underscores
WYSIWYG
$array[] = item
28. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
boolean
addcslashes()
int
29. A data structure that can hold a number of items of data of the same type eg. a list of names
XML
array
true
<?php
30. used to round numeric values.
1
reassign
trim()
round() Function
31. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
empty()
define()
negative numbers
null
32. Returns a string with backslashes in front of predefined characters
strlen()
arsort()
addslashes()
Object
33. An array of variables passed in the URL
$_GET[]
number_format()
$_POST[]
<<
34. _____ is a logical operator
html_entity_decode()
XOR
Parse error
variable
35. Used to find the amount of words in a string.
predefined
ceil()
boolean
str_word_count()
36. The array that stores variables specific to a user's visit
double quotes
substr_count()
$_SESSION[]
preg_split()
37. $_POST and $_GET are ________ variables.
array()
predefined
integer
substr_count()
38. Converts a string of ASCII characters to hexadecimal values
XOR
trim()
error_reporting (E_ALL)
bin2hex()
39. Tag to begin a php script
Magic Constant
superglobal
<?php
htmlentities()
40. Function used to round up to the highest integer
trim()
ceil()
mysql_fetch_array()
octal
41. The concatenation operator?
XOR
the period; .
rand()
addcslashes()
42. returns the number of matches found by a given search string under this format...
curly braces; ${$total}
preg_match()
===
ceil()
43. To sort values of an array without regard to the keys
sort()
the period; .
parentheses
addslashes()
44. To refer to an item in an array
client-side programing
indexed array
$varname[key]
array
45. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
boolean
empty()
$_GET[]
46. $_POST Data sent using POST found is sent to _______
predefined variable
?>
error_reporting (E_ALL | E_STRICT)
Shebang
47. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
shuffle()
for ($i = 0; $i < count($array); $i++) {statement(s);}
SEO
48. _________ can be used in conditional statements to set precedence
curly braces; ${$total}
parentheses
define()
getrandmax()
49. The ouput of var_export((bool)"NULL");
reassign
foreach loop
true
AJAX
50. bitwise right shift
indexed array
>>
asort()
mysql_fetch_array()