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 declare a constant
define()
mysql_fetch_array()
date()
error_reporting (0)
2. To sort values of an array in reversed order
number_format()
ksort()
rsort()
Array
3. Returns a string with backslashes in front of predefined characters
htmlspecialchars()
addslashes()
unset()
is_numeric()
4. To word wrap after a certain amount of characters.
wordwrap()
mysql_fetch_array()
isset()
integer
5. Variable names cannot begin with _______
numbers
arsort()
preg_replace()
Shebang
6. This will show all error reporting except for notice errors.
precedence
!= inequality
error_reporting (E_ALL & -E_NOTICE)
&
7. To refer to an item in an array
string
foreach loop
$varname[key]
HTTP
8. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
array()
$dbc = mysql_connect(hostname, username, password)
Shebang
9. either hasn't yet been set or is assigned NULL value
curly braces
octal
0
null
10. Uses two arguments: constant name and constant definition
associative array
<?php
define()
decimal
11. Alias of rtrim()
predefined
Hex
chop()
indexed array
12. The syntax for connecting to a database
===
$var++ and $var
$dbc = mysql_connect(hostname, username, password)
reassign
13. To set up error reporting
date()
function error_reporting()
error_reporting (E_ALL & -E_NOTICE)
fopen()
14. bitwise AND
&
boolean
preg_split()
Error
15. To assign keys to the values in an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
array()
$_POST[]
HTML
16. container of ordered data elements
$varname[key]
trim()
getrandmax()
Array
17. The output of var_export((float)array());
empty()
htmlentities()
0
strip_tags()
18. TRUE or FALSE
^
superglobal
underscores
boolean
19. Used to find the amount of words in a string.
foreach loop
str_word_count()
SEO
Hex
20. Used to check if a variable has any value (including 0 or FALSE or an empty string).
predefined
shuffle()
isset()
abs()
21. To close a connection between a database
mysql_close($dbc)
crypt()
str_word_count()
$varname[key]
22. To delete a variable or an element of an array
$array[] = item
E_STRICT
unset()
addcslashes()
23. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
preg_replace()
urlencode()
ASP
24. To check if a constant is already declared
defined()
not
sql
sort()
25. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
AJAX
error_reporting (0)
associative array
$array[] = item
26. bitwise right shift
>>
number_format()
array_merge()
string
27. signed integer
single quotes
int
===
<?php
28. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
XOR
echo
predefined
E_STRICT
29. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
ini_set ('display_errors', 1)
rsort()
foreach loop
30. The ouput of var_export((bool)"NULL");
htmlentities()
true
?>
list()
31. Variable names can begin with __________
underscores
SEO
^
1
32. To get over quotation marks while using arrays
mysql_fetch_object()
+
curly braces
^
33. used to round numeric values.
$array[] = item
Hex
round() Function
statement
34. any programing language where the user must support the language the script is written in
predefined
client-side programing
variable
SGML
35. Function that contains the highest value that rand() can have randomly
getrandmax()
rand()
substr_count()
$_REQUEST
36. Leading 0x: 0x13F or 0xA23
str_ireplace()
&
client-side programing
Hex
37. Hyper Text Markup Language
client-side programing
HTML
superglobal
Error
38. This will not show error reporting - it will be turned off.
string
error_reporting (0)
crypt()
octal
39. a positive or negative number
superglobal
+
addcslashes()
integer
40. a storage location in the computer's memory that has a type & a name and a contents
predefined
nl2br()
variable
XML
41. allows you to split strings based on more complex rules
loops
preg_split()
function
Parse error
42. Used to find the length of a string
strlen()
Parse error
nl2br()
$varname[key]
43. To find how many substrings are in a string
error_reporting (E_ALL & -E_NOTICE)
SGML
POST
substr_count()
44. collection of binary data
preg_split()
indexed array
$varname[key]
string
45. An array of variables passed with <input /> data
$_POST[]
$_SESSION[]
^
is_numeric()
46. Asynchronous Javascript And XML
strlen()
substr_count()
float
AJAX
47. To sort the values while maintaining the correlation between each value and its key - in reversed order
+= or -= or *= or /=
precedence
arsort()
$varname[key]
48. Tag to begin a php script
for ($i = 0; $i < count($array); $i++) {statement(s);}
$$
str_word_count()
<?php
49. does a certain action when called upon
===
function
preg_split()
Constant
50. a line of information that can be stored in a variable or used in a function or statement
define()
array_merge()
the period; .
string