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. Used to check if a variable has a valid numerical value; strings with numerical values pass.
single quotes
mysql_fetch_object()
is_numeric()
==
2. searches the subject for matches to a given pattern replaced with the given replacement text
include() and require()
preg_replace()
associative array
str_ireplace()
3. bitwise left shift
<<
$_POST[]
underscores
$array[] = item
4. Operators used to operate and assign
Constant
+= or -= or *= or /=
==
$_POST[]
5. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
reassign
nl2br()
preg_match()
general
6. To get over quotation marks while using arrays
nl2br()
count()
error_reporting (0)
curly braces
7. A data structure that can hold a number of items of data of the same type eg. a list of names
str_word_count()
error_reporting (E_ALL | E_STRICT)
abs()
array
8. a database which is best supported by PHP
string
mysql
$dbc = mysql_connect(hostname, username, password)
predefined
9. An array whose keys are numbers.
error_reporting (E_ALL | E_STRICT)
mysql_fetch_object()
XML
indexed array
10. Variable names cannot begin with _______
numbers
===
SEO
str_ireplace()
11. The prefix for a dynamic variable - also known as a variable variable
the dollar sign $
the period; .
indexed array
$$
12. To iterate over the values of an array
define()
float
for ($i = 0; $i < count($array); $i++) {statement(s);}
!= inequality
13. To remove all HTML and PHP tags.
function
int
strip_tags()
reassign
14. To sort values of an array without regard to the keys
getrandmax()
E_STRICT
sort()
array()
15. Hyper Text Markup Language
Notice
reassign
HTML
1
16. Function used to round down to the lowest integer
floor()
include() and require()
$dbc = mysql_connect(hostname, username, password)
<?php
17. bitwise XOR
?>
^
E_STRICT
boolean
18. either hasn't yet been set or is assigned NULL value
null
predefined variable
$dbc = mysql_connect(hostname, username, password)
asort()
19. 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
20. To refer to an item in an array
float
$$
$varname[key]
round() Function
21. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
WYSIWYG
PHP
str_ireplace()
22. The three types of loops in PHP are: for - while - ____.
string
Object
foreach
addcslashes()
23. _______ is a comparison operator
$var++ and $var
crypt()
error_reporting (E_ALL | E_STRICT)
!= inequality
24. signed floating-point value
Object
curly braces
preg_match()
float
25. addition
SEO
error_reporting (E_ALL | E_STRICT)
mysql_close($dbc)
+
26. Used to replace a substring with another string - it is not case-sensitive.
wordwrap()
str_ireplace()
round() Function
ceil()
27. All variables must begin with _________.
DTD
strtok()
urlencode()
the dollar sign $
28. Active Server Pages
rsort()
echo
ASP
>>
29. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
single quotes
bin2hex()
mysql_fetch_object()
POST
30. Control structures that break exit
list()
if/elseif/else and switch statements
str_word_count()
empty()
31. collection of binary data
string
getrandmax()
count()
PHP
32. ____ or key is referred to for a value within an array.
E_STRICT
general
index
echo
33. Converts a string of ASCII characters to hexadecimal values
chop()
array()
number_format()
bin2hex()
34. Uses two arguments: constant name and constant definition
include() and require()
define()
ASP
sql
35. signed integer
negative numbers
int
error_reporting (E_ALL)
<?php
36. says 'if' this then do this 'else' do this or 'while' this do this
statement
true
$dbc = mysql_connect(hostname, username, password)
+
37. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
parentheses
error_reporting (0)
XOR
38. Use ______ when a variable contains any amount of variables; in general.
html_entity_decode()
double quotes
XML
Array
39. This error arises from misusing a function.
Warning
Parse error
DTD
is_numeric()
40. To assign keys to the values in an array
rand()
asort()
array()
round() Function
41. Used to create a substring (referred to as a token) from a larger string
define()
strtok()
$_REQUEST
wordwrap()
42. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
$_SESSION[]
curly braces; ${$total}
floor()
E_STRICT
43. used to round numeric values.
round() Function
DTD
integer
predefined
44. To close a connection between a database
shuffle()
rand()
error_reporting (E_ALL | E_STRICT)
mysql_close($dbc)
45. Hypertext Preprocessor - a server-side programing language used to create webpages
true
abs()
PHP
<?php
46. To sort by the keys while maintaining the correlation between the key and its value
$_SESSION[]
.=
ksort()
+= or -= or *= or /=
47. Document Type Definitions
predefined
true
array
DTD
48. $_POST Data sent using POST found is sent to _______
variable
is_numeric()
Constant
predefined variable
49. Used to encrypt values - it is a one-way encryption method
drop
shuffle()
crypt()
addcslashes()
50. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
+
superglobal
ini_set ('display_errors', 1)
Parse error