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. _______ is a comparison operator
!= inequality
htmlentities()
array()
floor()
2. addition
mysql
+
DTD
the dollar sign $
3. To get over quotation marks while using arrays
htmlentities()
the dollar sign $
for ($i = 0; $i < count($array); $i++) {statement(s);}
curly braces
4. Hyper Text Markup Language
unset()
HTML
curly braces; ${$total}
htmlentities()
5. What You See Is What You Get
WYSIWYG
&
error_reporting (E_ALL | E_STRICT)
>>
6. Used to replace a substring with another string - it is not case-sensitive.
htmlentities()
$var++ and $var
bin2hex()
str_ireplace()
7. Define(NAME,value)
^
str_ireplace()
1
Constant
8. To find how many substrings are in a string
GET
substr_count()
Warning
loops
9. $_SERVER is a ________ variable.
predefined
chop()
number_format()
^
10. Use ______ when a variable contains any amount of variables; in general.
html_entity_decode()
function
preg_replace()
double quotes
11. An array of variables passed in the URL
$_GET[]
function error_reporting()
the escape character ''
rsort()
12. Tag to end a php script
mysql_fetch_array()
echo
?>
function
13. Operators used to operate and assign
float
+= or -= or *= or /=
$_POST[]
curly braces
14. searches the subject for matches to a given pattern replaced with the given replacement text
date()
str_word_count()
preg_replace()
getrandmax()
15. To reset an array _______ the array() function to the array
statement
html_entity_decode()
switch
reassign
16. the most basic function in PHP used to output information to the page
float
foreach loop
echo
array()
17. Used to find the length of a string
abs()
strtok()
preg_split()
strlen()
18. PHP has two conditional: if and ______.
switch
XOR
GET
<?php
19. a type with two possible values: true and false
strtok()
boolean
E_STRICT
the period; .
20. Hypertext Preprocessor - a server-side programing language used to create webpages
DTD
PHP
bin2hex()
index
21. To reorganise the array randomly
shuffle()
Object
Array
crypt()
22. used to round numeric values.
mysql_close($dbc)
round() Function
foreach
statement
23. Use ______ when there are no variables in the string
single quotes
Parse error
statement
preg_split()
24. An array of variables passed with <input /> data
sql
$_POST[]
substr_count()
error_reporting (E_ALL)
25. Used to display errors in a particular script - should be placed at top of script.
26. Variable names can begin with __________
Object
$_POST[]
+= or -= or *= or /=
underscores
27. Used to convert all HTML tags into their entity versions.
$_GET[]
htmlentities()
curly braces; ${$total}
function
28. The concatenation assignment operator?
open source
.=
Magic Constant
null
29. This will not show error reporting - it will be turned off.
$_POST[]
GET
AJAX
error_reporting (0)
30. A data structure that can hold a number of items of data of the same type eg. a list of names
$_POST[]
boolean
array
^
31. Use ________ to have multiple quotations in one string
control structure
the escape character ''
empty()
array
32. To include files - _______ will give errors and _________ will terminate execution().
$_SESSION[]
chr()
>>
include() and require()
33. EXtensible Markup Language
substr_count()
trim()
XML
server-side programing
34. Converts a string of ASCII characters to hexadecimal values
bin2hex()
Object
parentheses
int
35. bitwise AND
curly braces
boolean
^
&
36. a language in which to make querys to a database with
sql
server-side programing
$varname[key]
ceil()
37. Returns a string with backslashes in front of predefined characters
include() and require()
Constant
asort()
addslashes()
38. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
bin2hex()
$_REQUEST
server-side programing
Parse error
39. The four main error types are:Notice - Warning - ________ and Error.
Parse error
switch
AJAX
control structure
40. Asynchronous Javascript And XML
Warning
AJAX
error_reporting (E_ALL & -E_NOTICE)
string
41. To check if a constant is already declared
defined()
DTD
array_merge()
.=
42. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
count()
index
mysql_fetch_array()
addcslashes()
43. does a certain action when called upon
nl2br()
control structure
function
ASP
44. Tag to begin a php script
PHP
associative array
wordwrap()
<?php
45. To sort values of an array in reversed order
integer
rsort()
boolean
function
46. Document Type Definitions
switch
double quotes
crypt()
DTD
47. An array whose keys are numbers.
define()
drop
htmlentities()
indexed array
48. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
unset()
htmlentities()
$array[] = item
superglobal
49. Control structures that break exit
$dbc = mysql_connect(hostname, username, password)
foreach loop
array_merge()
if/elseif/else and switch statements
50. Used to convert certain HTML tags into their entity versions.
htmlspecialchars()
boolean
rand()
$_SESSION[]