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 determine the amount of elements in an array
curly braces; ${$total}
count()
variable
switch
2. Returns a string with backslashes in front of predefined characters
int
addslashes()
mysql_fetch_array()
Error
3. print $_SERVER will _____ work if you use the print function on arrays.
not
ASP
AJAX
Array
4. Standard Generalized Markup Language
Warning
reassign
round() Function
SGML
5. Returns a string with backslashes in front of the specified characters
addcslashes()
drop
urlencode()
$_POST[]
6. To sort values of an array without regard to the keys
getrandmax()
trim()
drop
sort()
7. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
predefined variable
rsort()
GET
8. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
Constant
single quotes
rsort()
9. The ouput of var_export((bool)"NULL");
if/elseif/else and switch statements
XML
nl2br()
true
10. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
echo
addcslashes()
string
11. $_POST Data sent using POST found is sent to _______
GET
int
+
predefined variable
12. To reset an array _______ the array() function to the array
nl2br()
reassign
underscores
$array[] = item
13. function Function used to create a random number
rand()
SGML
$var++ and $var
!= inequality
14. bitwise AND
for ($i = 0; $i < count($array); $i++) {statement(s);}
$dbc = mysql_connect(hostname, username, password)
htmlspecialchars()
&
15. container of both data and code
abs()
sql
Object
statement
16. 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.
GET
Hex
getrandmax()
error_reporting (E_ALL | E_STRICT)
17. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
is_numeric()
count()
array
18. Search Engine Optimization
for ($i = 0; $i < count($array); $i++) {statement(s);}
predefined
SEO
if/elseif/else and switch statements
19. Creates a pointer to a file with the declared mode (read - write -etc.).
isset()
general
fopen()
define()
20. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
curly braces; ${$total}
strtok()
==
trim()
21. To delete a variable or an element of an array
unset()
SEO
>>
==
22. Asynchronous Javascript And XML
AJAX
bin2hex()
true
statement
23. Use ________ to have multiple quotations in one string
decimal
urlencode()
the escape character ''
&
24. Document Type Definitions
DTD
single quotes
getrandmax()
SGML
25. Returns a character from a specified ASCII value
chr()
double quotes
indexed array
Parse error
26. To sort values of an array in reversed order
$_POST[]
error_reporting (E_ALL)
rsort()
Warning
27. either hasn't yet been set or is assigned NULL value
superglobal
preg_split()
null
rsort()
28. A conditional or loop is a ________________.
strip_tags()
drop
mysql_fetch_array()
control structure
29. Use ______ when a variable contains any amount of variables; in general.
for ($i = 0; $i < count($array); $i++) {statement(s);}
<?php
double quotes
SGML
30. _________ can be used in conditional statements to set precedence
predefined variable
parentheses
chr()
Array
31. standard notation
statement
decimal
int
curly braces; ${$total}
32. Function can you use to format a number with commas
number_format()
bin2hex()
POST
E_STRICT
33. An array whose keys are strings; also known as a hash.
associative array
HTTP
true
mysql_close($dbc)
34. To sort by the keys while maintaining the correlation between the key and its value
strip_tags()
$array[] = item
preg_split()
ksort()
35. a positive or negative number
integer
client-side programing
PHP
floor()
36. 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
37. The three types of loops in PHP are: for - while - ____.
sort()
!= inequality
+
foreach
38. $_SERVER is a ________ variable.
index
predefined
preg_split()
PHP
39. To counter htmlentities()
==
^
html_entity_decode()
addslashes()
40. Shorthand used to increment and decrement
is_numeric()
statement
<<
$var++ and $var
41. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
statement
$var++ and $var
ceil()
42. Control structure that continue exit - they perform specific statements for a determined number of iterations.
number_format()
<?php
loops
sql
43. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
+
trim()
AJAX
44. Hypertext Preprocessor - a server-side programing language used to create webpages
wordwrap()
PHP
===
0
45. returns the number of matches found by a given search string under this format...
preg_match()
^
HTTP
count()
46. ____ or key is referred to for a value within an array.
wordwrap()
index
the period; .
HTTP
47. Hyper Text Transfer Protocol
array
Warning
htmlentities()
HTTP
48. This error refers to a variable with no value.
strtok()
Notice
octal
negative numbers
49. a storage location in the computer's memory that has a type & a name and a contents
Magic Constant
Warning
variable
curly braces
50. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
for ($i = 0; $i < count($array); $i++) {statement(s);}
Parse error
array_merge()