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
AJAX
SGML
count()
list()
2. The array that stores variables specific to a user's visit
$_SESSION[]
getrandmax()
0
boolean
3. To refer to an item in an array
Parse error
$varname[key]
mysql_fetch_object()
ksort()
4. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
variable
error_reporting (0)
trim()
the period; .
5. $_POST Data sent using POST found is sent to _______
Hex
array()
array()
predefined variable
6. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
error_reporting (E_ALL)
number_format()
HTTP
7. Online applications and resources which are available to the general public with very few restrictions
mysql
open source
associative array
date()
8. addition
error_reporting (0)
strip_tags()
+
general
9. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_array()
loops
numbers
<<
10. Variable names can begin with __________
underscores
include() and require()
array()
HTTP
11. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
sort()
array()
boolean
12. The ouput of var_export((bool)"NULL");
int
0
isset()
true
13. a storage location in the computer's memory that has a type & a name and a contents
variable
.=
mysql_fetch_object()
null
14. Hypertext Preprocessor - a server-side programing language used to create webpages
str_ireplace()
fopen()
addslashes()
PHP
15. Tag to end a php script
mysql_fetch_object()
?>
general
sort()
16. Function can you use to format a number with commas
Parse error
echo
$dbc = mysql_connect(hostname, username, password)
number_format()
17. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
ceil()
==
$_REQUEST
E_STRICT
18. The syntax for connecting to a database
addslashes()
crypt()
$dbc = mysql_connect(hostname, username, password)
statement
19. To declare a constant
define()
+
Parse error
mysql_close($dbc)
20. Used to find the amount of words in a string.
floor()
$_REQUEST
HTTP
str_word_count()
21. any programing language where the script is parsed on the server
error_reporting (E_ALL | E_STRICT)
server-side programing
chr()
AJAX
22. A conditional or loop is a ________________.
foreach
define()
mysql_fetch_object()
control structure
23. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
precedence
error_reporting (E_ALL)
reassign
24. This will show all error reporting except for notice errors.
isset()
error_reporting (E_ALL & -E_NOTICE)
Warning
ksort()
25. Use ______ when a variable contains any amount of variables; in general.
double quotes
negative numbers
the period; .
count()
26. Use ______ when there are no variables in the string
single quotes
Parse error
error_reporting (E_ALL)
html_entity_decode()
27. the most basic function in PHP used to output information to the page
sql
error_reporting (E_ALL)
single quotes
echo
28. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
sql
parentheses
predefined
29. _____ is a logical operator
curly braces
XOR
the escape character ''
control structure
30. Active Server Pages
Error
rand()
general
ASP
31. To reorganise the array randomly
is_numeric()
the dollar sign $
substr_count()
shuffle()
32. To get time data
switch
unset()
ksort()
date()
33. _______ is a comparison operator
substr_count()
error_reporting (E_ALL)
!= inequality
$var++ and $var
34. 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
35. An array of variables passed in the URL
array
$_GET[]
foreach loop
chop()
36. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
urlencode()
general
E_STRICT
reassign
37. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
&
variable
POST
WYSIWYG
38. To reset an array _______ the array() function to the array
$_POST[]
include() and require()
reassign
number_format()
39. $_POST and $_GET are ________ variables.
SEO
predefined
define()
$dbc = mysql_connect(hostname, username, password)
40. bitwise right shift
>>
the period; .
asort()
count()
41. This fatal error arises from memory allocation problem.
list()
Error
for ($i = 0; $i < count($array); $i++) {statement(s);}
PHP
42. Converts a string of ASCII characters to hexadecimal values
bin2hex()
arsort()
PHP
list()
43. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
round() Function
$_REQUEST
include() and require()
variable
44. To put a dollar sign before a variable like $10 where 10 is the variable's value - you can escape the first dollar sign; $$cost; or you can use __________.
curly braces; ${$total}
round() Function
array()
urlencode()
45. To assign keys to the values in an array
WYSIWYG
array_merge()
array()
chop()
46. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
HTML
round() Function
str_ireplace()
$array[] = item
47. Variable names cannot begin with _______
Error
numbers
===
htmlspecialchars()
48. a line of information that can be stored in a variable or used in a function or statement
define()
string
ini_set ('display_errors', 1)
preg_replace()
49. leading zero: 0100 or 0567
PHP
decimal
octal
>>
50. Used to find the length of a string
strlen()
>>
ksort()
error_reporting (E_ALL)