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. An array of variables passed with <input /> data
$_POST[]
$dbc = mysql_connect(hostname, username, password)
double quotes
mysql_fetch_object()
2. This will show all error reporting.
int
negative numbers
$_SESSION[]
error_reporting (E_ALL)
3. Hyper Text Markup Language
^
not
HTML
array_merge()
4. Used to find the length of a string
the period; .
strlen()
index
ceil()
5. The output of var_export((float)array());
count()
0
trim()
if/elseif/else and switch statements
6. a storage location in the computer's memory that has a type & a name and a contents
HTML
variable
defined()
strtok()
7. To assign keys to the values in an array
$_POST[]
server-side programing
error_reporting (E_ALL & -E_NOTICE)
array()
8. $_POST Data sent using POST found is sent to _______
octal
predefined variable
list()
Magic Constant
9. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
mysql_fetch_object()
Array
predefined
10. To sort values of an array without regard to the keys
for ($i = 0; $i < count($array); $i++) {statement(s);}
single quotes
array()
sort()
11. a line of information that can be stored in a variable or used in a function or statement
float
mysql_fetch_object()
string
trim()
12. The ouput of var_export((bool)"NULL");
true
html_entity_decode()
array()
bin2hex()
13. Hyper Text Transfer Protocol
$_SESSION[]
chop()
Parse error
HTTP
14. used to round numeric values.
preg_match()
echo
preg_replace()
round() Function
15. A conditional or loop is a ________________.
statement
decimal
control structure
DTD
16. Function used to find the absolute value of a number or numeric variable
double quotes
switch
abs()
SEO
17. Function that contains the highest value that rand() can have randomly
superglobal
numbers
for ($i = 0; $i < count($array); $i++) {statement(s);}
getrandmax()
18. Converts a string of ASCII characters to hexadecimal values
bin2hex()
arsort()
foreach
echo
19. print $_SERVER will _____ work if you use the print function on arrays.
urlencode()
not
error_reporting (0)
define()
20. When used the value can be passed safely through the URL (GET).
the dollar sign $
urlencode()
Hex
WYSIWYG
21. The prefix for a dynamic variable - also known as a variable variable
preg_split()
Constant
$$
$_SESSION[]
22. All variables must begin with _________.
the dollar sign $
HTML
?>
string
23. Use ______ when a variable contains any amount of variables; in general.
$_SESSION[]
double quotes
string
index
24. Alias of rtrim()
rand()
chop()
Object
decimal
25. Variable names can begin with __________
predefined variable
array
underscores
null
26. a language in which to make querys to a database with
SGML
sql
mysql_close($dbc)
number_format()
27. a database which is best supported by PHP
mysql_fetch_array()
numbers
mysql
$_SESSION[]
28. searches the subject for matches to a given pattern replaced with the given replacement text
1
client-side programing
preg_replace()
statement
29. allows you to split strings based on more complex rules
preg_split()
curly braces; ${$total}
single quotes
Constant
30. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
ceil()
<<
$_REQUEST
echo
31. a type with two possible values: true and false
htmlspecialchars()
boolean
true
substr_count()
32. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
$_REQUEST
define()
$var++ and $var
33. Search Engine Optimization
parentheses
Parse error
single quotes
SEO
34. 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 __________.
octal
mysql
curly braces; ${$total}
decimal
35. To determine the amount of elements in an array
if/elseif/else and switch statements
ini_set ('display_errors', 1)
count()
SGML
36. Tag to begin a php script
Magic Constant
is_numeric()
&
<?php
37. Uses two arguments: constant name and constant definition
define()
empty()
>>
the period; .
38. ___________ can be used with substr() to count backward
array
parentheses
date()
negative numbers
39. To get over quotation marks while using arrays
Constant
curly braces
bin2hex()
array_merge()
40. $_POST and $_GET are ________ variables.
string
arsort()
&
predefined
41. returns the number of matches found by a given search string under this format...
E_STRICT
numbers
preg_match()
abs()
42. addition
+
null
double quotes
array()
43. bitwise AND
isset()
is_numeric()
curly braces
&
44. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
float
parentheses
+= or -= or *= or /=
45. To sort the values while maintaining the correlation between each value and its key
$_POST[]
asort()
strip_tags()
control structure
46. To set up error reporting
function error_reporting()
array_merge()
error_reporting (E_ALL & -E_NOTICE)
sort()
47. This error arises from misusing a function.
string
echo
Object
Warning
48. To merge arrays
function
crypt()
arsort()
array_merge()
49. collection of binary data
preg_match()
abs()
string
!= inequality
50. TRUE or FALSE
$$
boolean
list()
curly braces; ${$total}