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. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
!= inequality
nl2br()
===
floor()
2. Uses two arguments: constant name and constant definition
single quotes
nl2br()
define()
Parse error
3. bitwise right shift
drop
mysql_fetch_array()
define()
>>
4. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
fopen()
.=
E_STRICT
define()
5. To refer to an item in an array
int
include() and require()
error_reporting (E_ALL | E_STRICT)
$varname[key]
6. standard notation
list()
decimal
foreach
shuffle()
7. Function can you use to format a number with commas
number_format()
bin2hex()
parentheses
chop()
8. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
indexed array
echo
$array[] = item
===
9. Used to find the amount of words in a string.
floor()
str_word_count()
addslashes()
Warning
10. Returns a string with backslashes in front of the specified characters
echo
decimal
Parse error
addcslashes()
11. To reorganise the array randomly
mysql_close($dbc)
shuffle()
reassign
precedence
12. a language in which to make querys to a database with
reassign
array_merge()
$dbc = mysql_connect(hostname, username, password)
sql
13. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$dbc = mysql_connect(hostname, username, password)
$_REQUEST
fopen()
html_entity_decode()
14. bitwise left shift
underscores
error_reporting (E_ALL)
$_REQUEST
<<
15. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
sort()
associative array
WYSIWYG
empty()
16. Used to check if a variable has any value (including 0 or FALSE or an empty string).
htmlspecialchars()
null
isset()
mysql_close($dbc)
17. Variable names can begin with __________
trim()
underscores
fopen()
<<
18. _________ can be used in conditional statements to set precedence
htmlspecialchars()
parentheses
defined()
sql
19. The ouput of var_export((bool)"NULL");
XOR
true
E_STRICT
drop
20. signed integer
Parse error
int
htmlentities()
predefined variable
21. a positive or negative number
decimal
integer
number_format()
client-side programing
22. used to round numeric values.
GET
$_POST[]
htmlspecialchars()
round() Function
23. To declare a constant
switch
define()
strtok()
double quotes
24. Variable names cannot begin with _______
numbers
open source
predefined
floor()
25. Tag to end a php script
number_format()
Constant
?>
$var++ and $var
26. Use ________ to have multiple quotations in one string
isset()
count()
decimal
the escape character ''
27. Used to find the length of a string
strlen()
Constant
^
boolean
28. Define(NAME,value)
Constant
echo
not
integer
29. either hasn't yet been set or is assigned NULL value
if/elseif/else and switch statements
Constant
null
htmlentities()
30. collection of binary data
string
curly braces; ${$total}
chop()
preg_match()
31. Operators used to operate and assign
+= or -= or *= or /=
$varname[key]
Parse error
POST
32. The concatenation operator?
if/elseif/else and switch statements
the period; .
parentheses
$_REQUEST
33. function Function used to create a random number
$_POST[]
rand()
Parse error
error_reporting (E_ALL | E_STRICT)
34. 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 __________.
function error_reporting()
curly braces; ${$total}
error_reporting (E_ALL & -E_NOTICE)
error_reporting (E_ALL)
35. An array of variables passed in the URL
chop()
date()
$_GET[]
floor()
36. container of ordered data elements
error_reporting (E_ALL | E_STRICT)
Object
Array
double quotes
37. ____ or key is referred to for a value within an array.
function error_reporting()
Shebang
foreach loop
index
38. To sort by the keys while maintaining the correlation between the key and its value
reassign
ksort()
Object
$array[] = item
39. To check if a constant is already declared
if/elseif/else and switch statements
SGML
defined()
$var++ and $var
40. any programing language where the user must support the language the script is written in
client-side programing
server-side programing
error_reporting (E_ALL | E_STRICT)
Error
41. Function used to find the absolute value of a number or numeric variable
bin2hex()
function error_reporting()
abs()
precedence
42. $_POST Data sent using POST found is sent to _______
predefined variable
server-side programing
>>
strip_tags()
43. To find how many substrings are in a string
substr_count()
boolean
$_REQUEST
$_SESSION[]
44. Used to check if a variable has a valid numerical value; strings with numerical values pass.
AJAX
is_numeric()
if/elseif/else and switch statements
WYSIWYG
45. To iterate over the values of an array
^
for ($i = 0; $i < count($array); $i++) {statement(s);}
control structure
urlencode()
46. An array whose keys are strings; also known as a hash.
associative array
error_reporting (E_ALL)
XOR
$_REQUEST
47. An array of variables passed with <input /> data
wordwrap()
crypt()
$_POST[]
array()
48. searches the subject for matches to a given pattern replaced with the given replacement text
fopen()
underscores
preg_replace()
ceil()
49. ___________ can be used with substr() to count backward
negative numbers
the dollar sign $
trim()
superglobal
50. EXtensible Markup Language
==
the escape character ''
XML
parentheses