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 prefix for a dynamic variable - also known as a variable variable
$$
preg_match()
error_reporting (E_ALL & -E_NOTICE)
$dbc = mysql_connect(hostname, username, password)
2. Hyper Text Markup Language
<<
HTML
include() and require()
the escape character ''
3. The order of operations.
<?php
preg_replace()
define()
precedence
4. To sort by the keys while maintaining the correlation between the key and its value
double quotes
urlencode()
loops
ksort()
5. searches the subject for matches to a given pattern replaced with the given replacement text
$$
preg_replace()
variable
int
6. equivalence
chop()
addslashes()
==
POST
7. container of both data and code
mysql_fetch_object()
Object
$_REQUEST
asort()
8. A data structure that can hold a number of items of data of the same type eg. a list of names
array
<<
sql
$var++ and $var
9. signed integer
boolean
the escape character ''
int
include() and require()
10. a storage location in the computer's memory that has a type & a name and a contents
DTD
associative array
variable
the escape character ''
11. To refer to an item in an array
$varname[key]
error_reporting (0)
integer
==
12. The output of var_export((float)array(0));
control structure
curly braces; ${$total}
===
1
13. To counter htmlentities()
===
html_entity_decode()
precedence
curly braces; ${$total}
14. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
.=
?>
Magic Constant
unset()
15. To delete a variable or an element of an array
number_format()
unset()
preg_split()
array()
16. Used to encrypt values - it is a one-way encryption method
HTTP
statement
preg_replace()
crypt()
17. Variable names can begin with __________
?>
>>
underscores
null
18. Creates a pointer to a file with the declared mode (read - write -etc.).
+
fopen()
Object
?>
19. either hasn't yet been set or is assigned NULL value
HTML
shuffle()
null
XOR
20. Returns a character from a specified ASCII value
function
the dollar sign $
$var++ and $var
chr()
21. To get time data
date()
===
Hex
rand()
22. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
addslashes()
==
nl2br()
$array[] = item
23. To get over quotation marks while using arrays
Notice
curly braces; ${$total}
the period; .
curly braces
24. Hyper Text Transfer Protocol
boolean
HTTP
if/elseif/else and switch statements
indexed array
25. print $_SERVER will _____ work if you use the print function on arrays.
error_reporting (E_ALL & -E_NOTICE)
preg_split()
Notice
not
26. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
not
Parse error
?>
function
27. This will show all error reporting except for notice errors.
server-side programing
preg_split()
XOR
error_reporting (E_ALL & -E_NOTICE)
28. A conditional or loop is a ________________.
general
control structure
urlencode()
unset()
29. ____ or key is referred to for a value within an array.
XOR
integer
sql
index
30. To word wrap after a certain amount of characters.
Notice
wordwrap()
loops
empty()
31. allows you to split strings based on more complex rules
preg_split()
if/elseif/else and switch statements
octal
defined()
32. Used to find the amount of words in a string.
Shebang
str_word_count()
+
for ($i = 0; $i < count($array); $i++) {statement(s);}
33. _____ is a logical operator
XOR
numbers
mysql
define()
34. the most basic function in PHP used to output information to the page
echo
Parse error
rsort()
list()
35. To sort the values while maintaining the correlation between each value and its key - in reversed order
predefined
boolean
octal
arsort()
36. Tag to end a php script
SGML
?>
array
octal
37. Operators used to operate and assign
preg_split()
+= or -= or *= or /=
trim()
number_format()
38. The name of the #! used to designate the location of the PHP binary
error_reporting (0)
Shebang
loops
$varname[key]
39. Function used to round down to the lowest integer
AJAX
number_format()
floor()
chr()
40. $_POST Data sent using POST found is sent to _______
precedence
predefined variable
ini_set ('display_errors', 1)
wordwrap()
41. Shorthand used to increment and decrement
rand()
$var++ and $var
array()
fopen()
42. ___________ can be used with substr() to count backward
negative numbers
fopen()
addslashes()
preg_split()
43. PHP has two conditional: if and ______.
octal
switch
error_reporting (E_ALL)
precedence
44. any programing language where the script is parsed on the server
server-side programing
count()
Magic Constant
==
45. To iterate over the values of an array
date()
trim()
array()
for ($i = 0; $i < count($array); $i++) {statement(s);}
46. 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.
+= or -= or *= or /=
error_reporting (E_ALL | E_STRICT)
preg_match()
curly braces
47. Function used to round up to the highest integer
+= or -= or *= or /=
chop()
XML
ceil()
48. Function can you use to format a number with commas
Shebang
number_format()
DTD
double quotes
49. Alias of rtrim()
PHP
chr()
chop()
list()
50. Standard Generalized Markup Language
SGML
preg_match()
foreach
Magic Constant