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. To include files - _______ will give errors and _________ will terminate execution().
int
Shebang
include() and require()
nl2br()
2. To word wrap after a certain amount of characters.
float
wordwrap()
empty()
chop()
3. a database which is best supported by PHP
array()
number_format()
crypt()
mysql
4. signed integer
addslashes()
==
predefined
int
5. Used to find the length of a string
isset()
strlen()
htmlentities()
$_POST[]
6. A data structure that can hold a number of items of data of the same type eg. a list of names
fopen()
echo
Parse error
array
7. An array whose keys are strings; also known as a hash.
curly braces
WYSIWYG
associative array
html_entity_decode()
8. Alias of rtrim()
the escape character ''
error_reporting (E_ALL)
chop()
array_merge()
9. allows you to split strings based on more complex rules
count()
the dollar sign $
SGML
preg_split()
10. a line of information that can be stored in a variable or used in a function or statement
Constant
string
function error_reporting()
integer
11. This will not show error reporting - it will be turned off.
decimal
error_reporting (0)
WYSIWYG
$$
12. A conditional or loop is a ________________.
variable
control structure
Parse error
true
13. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
Parse error
0
$_REQUEST
14. Function that contains the highest value that rand() can have randomly
>>
getrandmax()
switch
POST
15. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
$array[] = item
Warning
boolean
16. Asynchronous Javascript And XML
AJAX
addcslashes()
Notice
decimal
17. To counter htmlentities()
html_entity_decode()
is_numeric()
abs()
HTML
18. PHP has two conditional: if and ______.
switch
function error_reporting()
===
array
19. Standard Generalized Markup Language
0
Warning
error_reporting (E_ALL)
SGML
20. bitwise XOR
^
Object
Magic Constant
variable
21. To declare a constant
<?php
define()
integer
$varname[key]
22. any programing language where the user must support the language the script is written in
define()
client-side programing
variable
integer
23. The four main error types are:Notice - Warning - ________ and Error.
predefined variable
E_STRICT
SEO
Parse error
24. To remove all HTML and PHP tags.
strip_tags()
number_format()
curly braces
numbers
25. An array whose keys are numbers.
statement
indexed array
reassign
Object
26. The name of the #! used to designate the location of the PHP binary
$varname[key]
WYSIWYG
$_POST[]
Shebang
27. Tag to end a php script
Parse error
?>
preg_match()
string
28. $_POST Data sent using POST found is sent to _______
HTML
loops
predefined variable
define()
29. print $_SERVER will _____ work if you use the print function on arrays.
not
is_numeric()
empty()
date()
30. Function used to find the absolute value of a number or numeric variable
Constant
abs()
nl2br()
E_STRICT
31. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
error_reporting (E_ALL & -E_NOTICE)
PHP
unset()
32. To find how many substrings are in a string
wordwrap()
substr_count()
defined()
HTML
33. a positive or negative number
integer
curly braces; ${$total}
float
index
34. To iterate over the values of an array
Object
for ($i = 0; $i < count($array); $i++) {statement(s);}
!= inequality
addslashes()
35. standard notation
HTTP
decimal
define()
Notice
36. Control structures that break exit
drop
empty()
WYSIWYG
if/elseif/else and switch statements
37. Used to create a substring (referred to as a token) from a larger string
ini_set ('display_errors', 1)
SGML
<<
strtok()
38. returns the number of matches found by a given search string under this format...
numbers
preg_match()
0
HTML
39. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
echo
shuffle()
the escape character ''
POST
40. Returns a string with backslashes in front of the specified characters
list()
addcslashes()
boolean
+= or -= or *= or /=
41. To determine the amount of elements in an array
sort()
count()
curly braces
strip_tags()
42. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
error_reporting (E_ALL)
$var++ and $var
ini_set ('display_errors', 1)
mysql_fetch_object()
43. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
empty()
===
Parse error
single quotes
44. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
WYSIWYG
$array[] = item
XOR
client-side programing
45. Returns a string with backslashes in front of predefined characters
null
addslashes()
+= or -= or *= or /=
PHP
46. This fatal error arises from memory allocation problem.
Error
integer
single quotes
open source
47. Used to check if a variable has any value (including 0 or FALSE or an empty string).
integer
isset()
array()
the escape character ''
48. Variable names can begin with __________
underscores
parentheses
1
include() and require()
49. EXtensible Markup Language
trim()
XML
boolean
the period; .
50. The array that stores variables specific to a user's visit
number_format()
XOR
$_SESSION[]
Warning