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. A conditional or loop is a ________________.
control structure
abs()
reassign
addcslashes()
2. Variable names cannot begin with _______
numbers
mysql_close($dbc)
Object
E_STRICT
3. This will show all error reporting.
error_reporting (E_ALL)
the escape character ''
POST
reassign
4. To reorganise the array randomly
mysql_close($dbc)
shuffle()
numbers
nl2br()
5. bitwise AND
empty()
&
for ($i = 0; $i < count($array); $i++) {statement(s);}
drop
6. The order of operations.
define()
function
precedence
associative array
7. says 'if' this then do this 'else' do this or 'while' this do this
client-side programing
htmlentities()
statement
the escape character ''
8. To find how many substrings are in a string
WYSIWYG
substr_count()
$array[] = item
?>
9. used to round numeric values.
abs()
WYSIWYG
round() Function
sort()
10. allows you to split strings based on more complex rules
define()
preg_split()
empty()
POST
11. Uses two arguments: constant name and constant definition
define()
nl2br()
Error
number_format()
12. To iterate over the values of an array
octal
for ($i = 0; $i < count($array); $i++) {statement(s);}
$_SESSION[]
true
13. ___________ can be used with substr() to count backward
drop
Shebang
htmlspecialchars()
negative numbers
14. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
fopen()
error_reporting (0)
trim()
Parse error
15. Returns a string with backslashes in front of the specified characters
underscores
addcslashes()
Error
htmlentities()
16. addition
arsort()
defined()
+
$var++ and $var
17. To sort values of an array without regard to the keys
predefined
!= inequality
getrandmax()
sort()
18. An array of variables passed in the URL
$_GET[]
count()
unset()
decimal
19. $_SERVER is a ________ variable.
<<
predefined
mysql_close($dbc)
Magic Constant
20. signed integer
list()
Parse error
int
htmlspecialchars()
21. This error arises from misusing a function.
===
list()
GET
Warning
22. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
array
array()
strlen()
23. 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
24. Use ________ to have multiple quotations in one string
the escape character ''
asort()
open source
$varname[key]
25. Online applications and resources which are available to the general public with very few restrictions
open source
include() and require()
predefined variable
integer
26. To word wrap after a certain amount of characters.
===
decimal
round() Function
wordwrap()
27. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
&
Magic Constant
null
mysql_fetch_array()
28. Returns a character from a specified ASCII value
$$
strip_tags()
HTTP
chr()
29. To merge arrays
Parse error
array_merge()
number_format()
$array[] = item
30. Used to find the amount of words in a string.
string
curly braces
isset()
str_word_count()
31. Function used to round down to the lowest integer
error_reporting (0)
Array
1
floor()
32. The array that stores variables specific to a user's visit
null
drop
nl2br()
$_SESSION[]
33. Operators used to operate and assign
0
+= or -= or *= or /=
error_reporting (E_ALL)
preg_match()
34. print $_SERVER will _____ work if you use the print function on arrays.
Parse error
not
preg_match()
loops
35. To get over quotation marks while using arrays
function
curly braces
htmlspecialchars()
floor()
36. signed floating-point value
string
$_SESSION[]
float
Error
37. To sort values of an array in reversed order
the escape character ''
Magic Constant
rsort()
chop()
38. To assign keys to the values in an array
control structure
array()
mysql_fetch_array()
index
39. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
open source
for ($i = 0; $i < count($array); $i++) {statement(s);}
shuffle()
40. To remove all HTML and PHP tags.
preg_split()
strip_tags()
str_ireplace()
sort()
41. What You See Is What You Get
>>
?>
ini_set ('display_errors', 1)
WYSIWYG
42. Returns a string with backslashes in front of predefined characters
addslashes()
rand()
!= inequality
unset()
43. This fatal error arises from memory allocation problem.
defined()
Array
Error
+
44. An array of variables passed with <input /> data
double quotes
$_POST[]
null
numbers
45. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
strip_tags()
Hex
^
46. function Function used to create a random number
client-side programing
include() and require()
rand()
floor()
47. Hyper Text Markup Language
Constant
DTD
bin2hex()
HTML
48. Search Engine Optimization
SEO
single quotes
string
reassign
49. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
float
ini_set ('display_errors', 1)
the dollar sign $
50. This will show all errors that fall under E_ALL or E_STRICT - the pipe | is used for 'or' so that errors that fall under either will be shown.
foreach
htmlentities()
error_reporting (E_ALL | E_STRICT)
ksort()