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. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
addcslashes()
Array
mysql
2. The prefix for a dynamic variable - also known as a variable variable
unset()
$$
strlen()
array()
3. searches the subject for matches to a given pattern replaced with the given replacement text
shuffle()
preg_split()
.=
preg_replace()
4. signed integer
int
preg_split()
+
error_reporting (E_ALL & -E_NOTICE)
5. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
array_merge()
Parse error
<<
6. This will not show error reporting - it will be turned off.
^
error_reporting (0)
chop()
list()
7. Use ______ when there are no variables in the string
echo
single quotes
arsort()
the escape character ''
8. When used the value can be passed safely through the URL (GET).
urlencode()
list()
crypt()
rand()
9. The concatenation assignment operator?
AJAX
.=
^
decimal
10. standard notation
decimal
list()
mysql_close($dbc)
rand()
11. collection of binary data
function error_reporting()
index
string
mysql_fetch_array()
12. Document Type Definitions
octal
array_merge()
DTD
decimal
13. Control structures that break exit
if/elseif/else and switch statements
the period; .
single quotes
0
14. a positive or negative number
POST
predefined
integer
preg_replace()
15. To reorganise the array randomly
$var++ and $var
shuffle()
curly braces; ${$total}
str_ireplace()
16. Tag to begin a php script
addcslashes()
<?php
preg_match()
indexed array
17. Used to display errors in a particular script - should be placed at top of script.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
18. _______ is a comparison operator
negative numbers
$dbc = mysql_connect(hostname, username, password)
!= inequality
wordwrap()
19. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
$_SESSION[]
associative array
===
20. leading zero: 0100 or 0567
octal
<?php
sql
arsort()
21. the most basic function in PHP used to output information to the page
Hex
decimal
echo
switch
22. used to round numeric values.
!= inequality
PHP
$var++ and $var
round() Function
23. To assign array element values to individual variables
isset()
general
list()
$array[] = item
24. Returns a string with backslashes in front of the specified characters
underscores
addcslashes()
string
numbers
25. either hasn't yet been set or is assigned NULL value
Notice
null
mysql_fetch_object()
variable
26. Asynchronous Javascript And XML
switch
+
getrandmax()
AJAX
27. Tag to end a php script
variable
Array
?>
error_reporting (0)
28. a storage location in the computer's memory that has a type & a name and a contents
$_GET[]
client-side programing
variable
Array
29. a database which is best supported by PHP
mysql
array
error_reporting (E_ALL & -E_NOTICE)
arsort()
30. Creates a pointer to a file with the declared mode (read - write -etc.).
precedence
&
chop()
fopen()
31. a type with two possible values: true and false
precedence
error_reporting (E_ALL)
SGML
boolean
32. Variable names cannot begin with _______
numbers
associative array
$_SESSION[]
$array[] = item
33. bitwise right shift
control structure
addcslashes()
XOR
>>
34. A conditional or loop is a ________________.
associative array
control structure
preg_split()
fopen()
35. Shorthand used to increment and decrement
.=
$_SESSION[]
1
$var++ and $var
36. The output of var_export((float)array());
0
Error
round() Function
error_reporting (E_ALL & -E_NOTICE)
37. Alias of rtrim()
chop()
strip_tags()
0
Warning
38. function Function used to create a random number
nl2br()
underscores
addcslashes()
rand()
39. identity
double quotes
parentheses
strtok()
===
40. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
!= inequality
GET
^
+= or -= or *= or /=
41. What You See Is What You Get
mysql_fetch_array()
if/elseif/else and switch statements
true
WYSIWYG
42. 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 __________.
$array[] = item
curly braces; ${$total}
mysql_fetch_array()
true
43. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
ini_set ('display_errors', 1)
crypt()
if/elseif/else and switch statements
trim()
44. All variables must begin with _________.
include() and require()
the dollar sign $
for ($i = 0; $i < count($array); $i++) {statement(s);}
if/elseif/else and switch statements
45. An array of variables passed in the URL
the period; .
mysql_close($dbc)
$_GET[]
empty()
46. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
&
error_reporting (E_ALL & -E_NOTICE)
Hex
47. PHP has two conditional: if and ______.
the period; .
switch
not
floor()
48. A data structure that can hold a number of items of data of the same type eg. a list of names
wordwrap()
WYSIWYG
array
+= or -= or *= or /=
49. To sort the values while maintaining the correlation between each value and its key
Error
foreach loop
asort()
htmlspecialchars()
50. Used to find the length of a string
mysql
>>
empty()
strlen()