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. To refer to an item in an array
$varname[key]
<<
rsort()
?>
2. Control structures that break exit
if/elseif/else and switch statements
integer
octal
count()
3. print $_SERVER will _____ work if you use the print function on arrays.
general
the escape character ''
Warning
not
4. any programing language where the user must support the language the script is written in
reassign
str_ireplace()
$_SESSION[]
client-side programing
5. Active Server Pages
Shebang
ASP
function error_reporting()
curly braces; ${$total}
6. An array of variables passed with <input /> data
error_reporting (E_ALL)
bin2hex()
$_POST[]
0
7. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
+= or -= or *= or /=
$_REQUEST
$array[] = item
preg_split()
8. The concatenation assignment operator?
.=
!= inequality
strip_tags()
Constant
9. Hyper Text Transfer Protocol
HTTP
===
string
array_merge()
10. This error refers to a variable with no value.
decimal
count()
Notice
associative array
11. All variables must begin with _________.
server-side programing
indexed array
the dollar sign $
define()
12. Online applications and resources which are available to the general public with very few restrictions
open source
abs()
general
rsort()
13. To sort by the keys while maintaining the correlation between the key and its value
AJAX
ksort()
client-side programing
SGML
14. _________ can be used in conditional statements to set precedence
strip_tags()
str_ireplace()
parentheses
float
15. Tag to end a php script
predefined
sql
getrandmax()
?>
16. 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.
>>
Object
error_reporting (E_ALL | E_STRICT)
ASP
17. To declare a constant
+= or -= or *= or /=
floor()
HTTP
define()
18. bitwise AND
boolean
&
$_POST[]
if/elseif/else and switch statements
19. TRUE or FALSE
$$
foreach loop
index
boolean
20. When used the value can be passed safely through the URL (GET).
numbers
client-side programing
chr()
urlencode()
21. The ouput of var_export((bool)"NULL");
true
superglobal
curly braces; ${$total}
empty()
22. collection of binary data
Parse error
Warning
str_word_count()
string
23. Used to encrypt values - it is a one-way encryption method
crypt()
mysql_close($dbc)
^
count()
24. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
$$
Hex
negative numbers
E_STRICT
25. _______ is a comparison operator
SGML
array_merge()
!= inequality
switch
26. An array of variables passed in the URL
str_word_count()
htmlspecialchars()
$_GET[]
urlencode()
27. This will show all error reporting.
int
sql
error_reporting (E_ALL)
HTML
28. Use ______ when there are no variables in the string
true
float
single quotes
trim()
29. A data structure that can hold a number of items of data of the same type eg. a list of names
strip_tags()
Warning
mysql_close($dbc)
array
30. Converts a string of ASCII characters to hexadecimal values
E_STRICT
bin2hex()
indexed array
the escape character ''
31. What You See Is What You Get
DTD
the dollar sign $
WYSIWYG
empty()
32. To delete a variable or an element of an array
array_merge()
unset()
define()
Array
33. To get over quotation marks while using arrays
curly braces
empty()
DTD
count()
34. To sort the values while maintaining the correlation between each value and its key - in reversed order
echo
arsort()
1
associative array
35. either hasn't yet been set or is assigned NULL value
null
mysql_close($dbc)
urlencode()
Hex
36. $_SERVER is a ________ variable.
array()
GET
asort()
predefined
37. The array that stores variables specific to a user's visit
control structure
!= inequality
Warning
$_SESSION[]
38. To remove all HTML and PHP tags.
Hex
strip_tags()
Array
octal
39. To find how many substrings are in a string
trim()
$dbc = mysql_connect(hostname, username, password)
substr_count()
Hex
40. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
urlencode()
==
server-side programing
41. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
HTTP
foreach loop
chr()
42. Used to check if a variable has a valid numerical value; strings with numerical values pass.
Notice
is_numeric()
$_REQUEST
trim()
43. Define(NAME,value)
Constant
function error_reporting()
null
curly braces; ${$total}
44. does a certain action when called upon
$var++ and $var
AJAX
function
trim()
45. says 'if' this then do this 'else' do this or 'while' this do this
switch
asort()
SEO
statement
46. This error arises from misusing a function.
boolean
the dollar sign $
Warning
0
47. To reset an array _______ the array() function to the array
AJAX
define()
reassign
+= or -= or *= or /=
48. To sort the values while maintaining the correlation between each value and its key
foreach
arsort()
asort()
<?php
49. a storage location in the computer's memory that has a type & a name and a contents
int
is_numeric()
drop
variable
50. This will not show error reporting - it will be turned off.
arsort()
switch
single quotes
error_reporting (0)