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. _________ can be used in conditional statements to set precedence
parentheses
$_REQUEST
abs()
HTML
2. To assign array element values to individual variables
list()
negative numbers
array()
foreach loop
3. standard notation
decimal
ini_set ('display_errors', 1)
POST
sql
4. Uses two arguments: constant name and constant definition
strip_tags()
$_GET[]
define()
shuffle()
5. Used to find the length of a string
empty()
nl2br()
shuffle()
strlen()
6. ___________ can be used with substr() to count backward
strtok()
string
ceil()
negative numbers
7. Function used to find the absolute value of a number or numeric variable
substr_count()
index
abs()
Magic Constant
8. To sort by the keys while maintaining the correlation between the key and its value
round() Function
ksort()
count()
crypt()
9. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_array()
mysql_fetch_object()
htmlentities()
boolean
10. 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
11. identity
variable
===
Object
abs()
12. What You See Is What You Get
WYSIWYG
predefined variable
HTTP
string
13. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
==
unset()
decimal
14. Used to find the amount of words in a string.
arsort()
nl2br()
str_word_count()
array
15. Operators used to operate and assign
foreach
PHP
+= or -= or *= or /=
sql
16. An array whose keys are strings; also known as a hash.
Notice
!= inequality
associative array
$array[] = item
17. a positive or negative number
unset()
getrandmax()
integer
control structure
18. used to round numeric values.
round() Function
E_STRICT
array_merge()
switch
19. $_POST Data sent using POST found is sent to _______
XOR
rand()
predefined variable
open source
20. The syntax for connecting to a database
rsort()
if/elseif/else and switch statements
$dbc = mysql_connect(hostname, username, password)
$array[] = item
21. _______ is a comparison operator
XML
!= inequality
Parse error
$dbc = mysql_connect(hostname, username, password)
22. $_POST and $_GET are ________ variables.
array
HTML
predefined
ini_set ('display_errors', 1)
23. Standard Generalized Markup Language
general
strlen()
SGML
?>
24. Used to convert all HTML tags into their entity versions.
XML
wordwrap()
htmlentities()
list()
25. To get time data
Magic Constant
date()
Constant
array
26. a database which is best supported by PHP
for ($i = 0; $i < count($array); $i++) {statement(s);}
mysql
array
strlen()
27. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
addcslashes()
array()
parentheses
28. An array whose keys are numbers.
Warning
indexed array
sort()
string
29. Creates a pointer to a file with the declared mode (read - write -etc.).
predefined variable
rand()
fopen()
nl2br()
30. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
parentheses
abs()
list()
31. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
SEO
ASP
$_REQUEST
Constant
32. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
mysql_close($dbc)
DTD
E_STRICT
function
33. The concatenation operator?
the period; .
DTD
index
ASP
34. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
error_reporting (0)
trim()
error_reporting (E_ALL | E_STRICT)
addslashes()
35. Hyper Text Transfer Protocol
Magic Constant
?>
float
HTTP
36. This will not show error reporting - it will be turned off.
the period; .
error_reporting (0)
substr_count()
&
37. a type with two possible values: true and false
WYSIWYG
strtok()
boolean
int
38. When used the value can be passed safely through the URL (GET).
Array
&
urlencode()
general
39. Used to replace a substring with another string - it is not case-sensitive.
strlen()
GET
double quotes
str_ireplace()
40. This error refers to a variable with no value.
Notice
loops
variable
number_format()
41. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
^
superglobal
.=
client-side programing
42. container of ordered data elements
strtok()
abs()
Array
boolean
43. To reset an array _______ the array() function to the array
SEO
drop
reassign
preg_split()
44. To sort the values while maintaining the correlation between each value and its key
chr()
mysql_fetch_array()
Hex
asort()
45. a storage location in the computer's memory that has a type & a name and a contents
AJAX
variable
list()
$var++ and $var
46. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
getrandmax()
echo
precedence
47. the most basic function in PHP used to output information to the page
echo
SEO
sort()
strip_tags()
48. This fatal error arises from memory allocation problem.
negative numbers
general
ini_set ('display_errors', 1)
Error
49. All variables must begin with _________.
index
Error
string
the dollar sign $
50. Used to convert certain HTML tags into their entity versions.
substr_count()
preg_match()
single quotes
htmlspecialchars()