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. a positive or negative number
$_REQUEST
integer
server-side programing
Parse error
2. Variable names can begin with __________
$dbc = mysql_connect(hostname, username, password)
the escape character ''
underscores
round() Function
3. An array whose keys are numbers.
Parse error
nl2br()
Array
indexed array
4. print $_SERVER will _____ work if you use the print function on arrays.
float
not
string
$_SESSION[]
5. Online applications and resources which are available to the general public with very few restrictions
open source
asort()
Magic Constant
array_merge()
6. This fatal error arises from memory allocation problem.
==
preg_split()
AJAX
Error
7. _______ is a comparison operator
!= inequality
array
for ($i = 0; $i < count($array); $i++) {statement(s);}
Object
8. Define(NAME,value)
Constant
preg_split()
$_REQUEST
server-side programing
9. The three types of loops in PHP are: for - while - ____.
float
foreach
XOR
defined()
10. container of ordered data elements
shuffle()
mysql
Array
count()
11. Uses two arguments: constant name and constant definition
define()
string
list()
the escape character ''
12. _________ can be used in conditional statements to set precedence
rand()
parentheses
crypt()
int
13. The concatenation assignment operator?
.=
wordwrap()
single quotes
Error
14. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
round() Function
error_reporting (E_ALL | E_STRICT)
$array[] = item
15. To reorganise the array randomly
error_reporting (0)
bin2hex()
shuffle()
$_SESSION[]
16. searches the subject for matches to a given pattern replaced with the given replacement text
POST
general
preg_replace()
the escape character ''
17. either hasn't yet been set or is assigned NULL value
null
WYSIWYG
nl2br()
list()
18. To assign keys to the values in an array
$varname[key]
asort()
array()
addslashes()
19. Used to find the length of a string
SGML
strlen()
Warning
AJAX
20. This will show all error reporting.
Magic Constant
underscores
foreach loop
error_reporting (E_ALL)
21. Active Server Pages
variable
ASP
crypt()
GET
22. To find how many substrings are in a string
define()
substr_count()
===
date()
23. 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.
the escape character ''
error_reporting (E_ALL & -E_NOTICE)
error_reporting (E_ALL | E_STRICT)
Constant
24. Function that contains the highest value that rand() can have randomly
$_REQUEST
precedence
statement
getrandmax()
25. Control structures that break exit
$_GET[]
if/elseif/else and switch statements
curly braces
Magic Constant
26. Used to find the amount of words in a string.
index
XOR
str_word_count()
associative array
27. function Function used to create a random number
preg_match()
AJAX
function error_reporting()
rand()
28. Converts a string of ASCII characters to hexadecimal values
Shebang
array()
$_GET[]
bin2hex()
29. To iterate over the keys and values of an array
addcslashes()
foreach loop
Warning
fopen()
30. 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 __________.
addslashes()
array()
curly braces; ${$total}
the escape character ''
31. Use ______ when a variable contains any amount of variables; in general.
index
Notice
superglobal
double quotes
32. To set up error reporting
function error_reporting()
function
html_entity_decode()
predefined variable
33. equivalence
foreach
^
==
mysql
34. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
HTTP
str_word_count()
preg_replace()
35. Leading 0x: 0x13F or 0xA23
Hex
server-side programing
abs()
octal
36. The array that stores variables specific to a user's visit
html_entity_decode()
$$
reassign
$_SESSION[]
37. A data structure that can hold a number of items of data of the same type eg. a list of names
decimal
array
SEO
Magic Constant
38. bitwise right shift
>>
number_format()
mysql_close($dbc)
!= inequality
39. The syntax for connecting to a database
is_numeric()
variable
$dbc = mysql_connect(hostname, username, password)
mysql_fetch_object()
40. To delete a variable or an element of an array
&
error_reporting (0)
unset()
underscores
41. To sort by the keys while maintaining the correlation between the key and its value
function
not
PHP
ksort()
42. Returns a character from a specified ASCII value
HTTP
chr()
floor()
preg_split()
43. To close a connection between a database
predefined variable
mysql_close($dbc)
Notice
true
44. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
fopen()
$array[] = item
abs()
==
45. ____ or key is referred to for a value within an array.
unset()
error_reporting (0)
index
HTML
46. identity
define()
str_word_count()
===
the escape character ''
47. Function used to find the absolute value of a number or numeric variable
numbers
abs()
define()
crypt()
48. bitwise XOR
Parse error
^
int
Hex
49. The four main error types are:Notice - Warning - ________ and Error.
Object
Parse error
curly braces; ${$total}
not
50. Used to create a substring (referred to as a token) from a larger string
strtok()
float
0
str_ireplace()