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. When used the value can be passed safely through the URL (GET).
sql
urlencode()
$_GET[]
function
2. Uses two arguments: constant name and constant definition
shuffle()
switch
define()
XML
3. To refer to an item in an array
$_SESSION[]
strlen()
PHP
$varname[key]
4. An array whose keys are numbers.
indexed array
Error
integer
true
5. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
mysql_fetch_object()
urlencode()
$_REQUEST
mysql_fetch_array()
6. Function used to round down to the lowest integer
decimal
error_reporting (E_ALL | E_STRICT)
floor()
rsort()
7. To iterate over the values of an array
general
for ($i = 0; $i < count($array); $i++) {statement(s);}
Magic Constant
ksort()
8. Control structure that continue exit - they perform specific statements for a determined number of iterations.
include() and require()
error_reporting (E_ALL)
floor()
loops
9. To delete a variable or an element of an array
number_format()
unset()
not
1
10. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
error_reporting (0)
mysql_close($dbc)
curly braces; ${$total}
mysql_fetch_object()
11. All variables must begin with _________.
the escape character ''
Shebang
the dollar sign $
sort()
12. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
underscores
GET
preg_replace()
drop
13. This fatal error arises from memory allocation problem.
Error
htmlentities()
curly braces; ${$total}
general
14. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
.=
unset()
HTTP
15. $_POST Data sent using POST found is sent to _______
predefined variable
wordwrap()
index
curly braces; ${$total}
16. says 'if' this then do this 'else' do this or 'while' this do this
array()
mysql_fetch_array()
statement
Notice
17. allows you to split strings based on more complex rules
preg_split()
mysql_close($dbc)
$$
number_format()
18. standard notation
$var++ and $var
<<
decimal
Array
19. An array of variables passed with <input /> data
array()
arsort()
substr_count()
$_POST[]
20. Define(NAME,value)
Constant
list()
parentheses
general
21. To sort values of an array without regard to the keys
sort()
isset()
DTD
round() Function
22. Asynchronous Javascript And XML
Parse error
crypt()
^
AJAX
23. The concatenation operator?
the period; .
int
floor()
the dollar sign $
24. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
float
include() and require()
XML
25. Variable names cannot begin with _______
numbers
addcslashes()
index
str_ireplace()
26. A conditional or loop is a ________________.
XML
getrandmax()
underscores
control structure
27. To word wrap after a certain amount of characters.
underscores
predefined variable
array()
wordwrap()
28. container of both data and code
date()
PHP
Object
array
29. bitwise left shift
boolean
+
error_reporting (0)
<<
30. searches the subject for matches to a given pattern replaced with the given replacement text
curly braces; ${$total}
float
string
preg_replace()
31. To assign array element values to individual variables
the dollar sign $
list()
string
mysql_fetch_object()
32. To find how many substrings are in a string
curly braces; ${$total}
substr_count()
nl2br()
Parse error
33. bitwise AND
predefined
&
addslashes()
$_SESSION[]
34. ____ or key is referred to for a value within an array.
index
$_SESSION[]
include() and require()
mysql
35. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
XML
nl2br()
htmlspecialchars()
if/elseif/else and switch statements
36. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
>>
string
<<
37. _____ is a logical operator
XOR
+= or -= or *= or /=
sort()
Notice
38. Function that contains the highest value that rand() can have randomly
error_reporting (E_ALL & -E_NOTICE)
define()
getrandmax()
addcslashes()
39. To sort values of an array in reversed order
?>
rsort()
addcslashes()
double quotes
40. This error refers to a variable with no value.
$_SESSION[]
strip_tags()
Notice
mysql_close($dbc)
41. To close a connection between a database
curly braces
arsort()
mysql_close($dbc)
error_reporting (E_ALL)
42. Used to convert all HTML tags into their entity versions.
function error_reporting()
<?php
error_reporting (E_ALL)
htmlentities()
43. To counter htmlentities()
html_entity_decode()
mysql
SGML
AJAX
44. Hypertext Preprocessor - a server-side programing language used to create webpages
associative array
PHP
predefined variable
trim()
45. What You See Is What You Get
abs()
crypt()
rand()
WYSIWYG
46. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
sql
wordwrap()
POST
crypt()
47. collection of binary data
ksort()
variable
string
array_merge()
48. To get time data
integer
date()
shuffle()
HTML
49. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
define()
urlencode()
client-side programing
50. To declare a constant
switch
floor()
define()
loops