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. Use ______ when there are no variables in the string
precedence
single quotes
str_word_count()
Constant
2. Function can you use to format a number with commas
variable
not
number_format()
reassign
3. PHP has two conditional: if and ______.
strtok()
trim()
switch
precedence
4. Operators used to operate and assign
+= or -= or *= or /=
include() and require()
open source
Object
5. bitwise XOR
rsort()
^
indexed array
float
6. searches the subject for matches to a given pattern replaced with the given replacement text
string
Parse error
AJAX
preg_replace()
7. 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
8. Use ________ to have multiple quotations in one string
single quotes
the escape character ''
control structure
Parse error
9. A conditional or loop is a ________________.
Warning
error_reporting (E_ALL)
control structure
underscores
10. a type with two possible values: true and false
$_POST[]
boolean
drop
array_merge()
11. Returns a character from a specified ASCII value
urlencode()
chr()
reassign
>>
12. What You See Is What You Get
WYSIWYG
asort()
mysql
curly braces; ${$total}
13. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
boolean
foreach loop
preg_match()
14. Leading 0x: 0x13F or 0xA23
strlen()
+
Hex
getrandmax()
15. Tag to end a php script
?>
negative numbers
reassign
Parse error
16. signed integer
int
array
Notice
Hex
17. EXtensible Markup Language
rand()
general
XML
sql
18. bitwise right shift
&
>>
Parse error
predefined
19. Hyper Text Transfer Protocol
HTTP
error_reporting (E_ALL | E_STRICT)
Notice
error_reporting (0)
20. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
rsort()
associative array
error_reporting (E_ALL | E_STRICT)
21. $_POST Data sent using POST found is sent to _______
negative numbers
SGML
predefined variable
echo
22. The three types of loops in PHP are: for - while - ____.
foreach
if/elseif/else and switch statements
$_POST[]
chr()
23. An array of variables passed in the URL
$_GET[]
arsort()
Warning
array()
24. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
1
Parse error
addslashes()
25. This error arises from misusing a function.
str_ireplace()
Warning
predefined variable
^
26. used to round numeric values.
round() Function
server-side programing
defined()
0
27. Standard Generalized Markup Language
ASP
SGML
crypt()
shuffle()
28. print $_SERVER will _____ work if you use the print function on arrays.
not
rsort()
switch
$var++ and $var
29. This will show all error reporting.
urlencode()
strip_tags()
error_reporting (E_ALL)
not
30. To sort values of an array without regard to the keys
error_reporting (E_ALL & -E_NOTICE)
>>
null
sort()
31. Variable names can begin with __________
DTD
int
underscores
PHP
32. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
true
$dbc = mysql_connect(hostname, username, password)
^
33. The syntax for connecting to a database
statement
$dbc = mysql_connect(hostname, username, password)
strlen()
isset()
34. leading zero: 0100 or 0567
octal
not
HTTP
HTML
35. identity
HTTP
DTD
XOR
===
36. To find how many substrings are in a string
substr_count()
urlencode()
mysql_fetch_array()
negative numbers
37. Returns a string with backslashes in front of the specified characters
GET
arsort()
true
addcslashes()
38. The four main error types are:Notice - Warning - ________ and Error.
isset()
E_STRICT
Parse error
curly braces; ${$total}
39. Used to encrypt values - it is a one-way encryption method
define()
$_SESSION[]
crypt()
precedence
40. To iterate over the values of an array
Error
$var++ and $var
control structure
for ($i = 0; $i < count($array); $i++) {statement(s);}
41. says 'if' this then do this 'else' do this or 'while' this do this
preg_split()
parentheses
statement
Error
42. a line of information that can be stored in a variable or used in a function or statement
string
sql
nl2br()
client-side programing
43. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
Warning
control structure
mysql_fetch_object()
htmlentities()
44. Variable names cannot begin with _______
index
numbers
preg_split()
mysql_close($dbc)
45. To sort the values while maintaining the correlation between each value and its key
function
error_reporting (0)
htmlentities()
asort()
46. To refer to an item in an array
Object
$varname[key]
SEO
DTD
47. The concatenation assignment operator?
negative numbers
.=
superglobal
1
48. To close a connection between a database
mysql_close($dbc)
ceil()
$_SESSION[]
+
49. To check if a constant is already declared
+
defined()
isset()
asort()
50. standard notation
Parse error
ksort()
numbers
decimal