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. the most basic function in PHP used to output information to the page
echo
string
associative array
fopen()
2. The four main error types are:Notice - Warning - ________ and Error.
predefined
HTML
Parse error
round() Function
3. This will show all error reporting.
urlencode()
Constant
ksort()
error_reporting (E_ALL)
4. Operators used to operate and assign
+= or -= or *= or /=
int
parentheses
predefined
5. Uses two arguments: constant name and constant definition
define()
wordwrap()
$_SESSION[]
rand()
6. $_SERVER is a ________ variable.
!= inequality
predefined
Hex
ceil()
7. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
single quotes
superglobal
unset()
?>
8. Define(NAME,value)
crypt()
predefined
Constant
array()
9. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
html_entity_decode()
$$
Parse error
==
10. used to round numeric values.
$array[] = item
==
round() Function
variable
11. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
$var++ and $var
curly braces; ${$total}
$$
12. Use ______ when a variable contains any amount of variables; in general.
Constant
!= inequality
$_SESSION[]
double quotes
13. To check if a constant is already declared
Notice
trim()
error_reporting (0)
defined()
14. This fatal error arises from memory allocation problem.
sql
int
ceil()
Error
15. any programing language where the user must support the language the script is written in
$_GET[]
negative numbers
client-side programing
index
16. Returns a string with backslashes in front of the specified characters
<?php
server-side programing
==
addcslashes()
17. container of ordered data elements
$_POST[]
Array
Notice
1
18. standard notation
mysql_close($dbc)
decimal
Parse error
E_STRICT
19. To sort values of an array in reversed order
parentheses
Object
rsort()
if/elseif/else and switch statements
20. Used to convert all HTML tags into their entity versions.
fopen()
PHP
!= inequality
htmlentities()
21. To refer to an item in an array
!= inequality
$varname[key]
html_entity_decode()
array
22. To assign array element values to individual variables
unset()
substr_count()
urlencode()
list()
23. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
define()
parentheses
the period; .
trim()
24. addition
+
!= inequality
addslashes()
str_word_count()
25. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
Notice
error_reporting (E_ALL)
the dollar sign $
26. _________ can be used in conditional statements to set precedence
foreach loop
GET
parentheses
index
27. To find how many substrings are in a string
htmlentities()
substr_count()
floor()
function error_reporting()
28. Function used to round down to the lowest integer
predefined
floor()
the escape character ''
indexed array
29. The prefix for a dynamic variable - also known as a variable variable
reassign
$$
htmlspecialchars()
error_reporting (E_ALL)
30. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
define()
XML
asort()
31. Used to find the length of a string
statement
abs()
<?php
strlen()
32. equivalence
boolean
precedence
unset()
==
33. To sort values of an array without regard to the keys
error_reporting (E_ALL & -E_NOTICE)
sort()
$var++ and $var
strlen()
34. any programing language where the script is parsed on the server
Magic Constant
server-side programing
preg_replace()
integer
35. An array of variables passed with <input /> data
chr()
Magic Constant
$_POST[]
==
36. Used to find the amount of words in a string.
$_GET[]
predefined
sql
str_word_count()
37. To determine the amount of elements in an array
abs()
count()
$dbc = mysql_connect(hostname, username, password)
number_format()
38. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
asort()
switch
function
$array[] = item
39. leading zero: 0100 or 0567
$dbc = mysql_connect(hostname, username, password)
HTML
crypt()
octal
40. bitwise XOR
arsort()
>>
^
double quotes
41. 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.
$_REQUEST
htmlentities()
error_reporting (E_ALL | E_STRICT)
GET
42. Standard Generalized Markup Language
XOR
SGML
bin2hex()
$dbc = mysql_connect(hostname, username, password)
43. Tag to end a php script
string
HTTP
WYSIWYG
?>
44. Returns a string with backslashes in front of predefined characters
superglobal
addslashes()
SEO
<?php
45. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
ksort()
Notice
getrandmax()
E_STRICT
46. container of both data and code
crypt()
Object
preg_replace()
the period; .
47. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_array()
addslashes()
if/elseif/else and switch statements
reassign
48. This will show all error reporting except for notice errors.
GET
indexed array
foreach
error_reporting (E_ALL & -E_NOTICE)
49. To get time data
predefined variable
include() and require()
date()
string
50. To reset an array _______ the array() function to the array
server-side programing
array_merge()
reassign
curly braces