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. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
define()
$array[] = item
Constant
2. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
ksort()
define()
index
mysql_fetch_array()
3. Used to check if a variable has any value (including 0 or FALSE or an empty string).
addslashes()
isset()
Magic Constant
control structure
4. The three types of loops in PHP are: for - while - ____.
reassign
foreach
mysql_close($dbc)
Array
5. print $_SERVER will _____ work if you use the print function on arrays.
not
abs()
mysql_close($dbc)
round() Function
6. To iterate over the values of an array
index
array()
for ($i = 0; $i < count($array); $i++) {statement(s);}
count()
7. To iterate over the keys and values of an array
foreach loop
addslashes()
count()
&
8. TRUE or FALSE
>>
boolean
Shebang
1
9. ____ or key is referred to for a value within an array.
precedence
1
index
Hex
10. Used to convert certain HTML tags into their entity versions.
$_SESSION[]
+= or -= or *= or /=
htmlspecialchars()
true
11. To merge arrays
array_merge()
float
preg_split()
drop
12. Used to convert all HTML tags into their entity versions.
GET
1
htmlentities()
variable
13. To get over quotation marks while using arrays
curly braces
$_REQUEST
control structure
foreach
14. _____ is a logical operator
XOR
Array
superglobal
array_merge()
15. identity
float
abs()
PHP
===
16. addition
+
indexed array
error_reporting (E_ALL | E_STRICT)
negative numbers
17. The output of var_export((float)array(0));
DTD
htmlspecialchars()
AJAX
1
18. ___________ can be used with substr() to count backward
negative numbers
Hex
mysql_fetch_array()
Notice
19. Operators used to operate and assign
number_format()
+= or -= or *= or /=
HTML
reassign
20. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
general
$array[] = item
precedence
is_numeric()
21. The prefix for a dynamic variable - also known as a variable variable
$$
string
addslashes()
function
22. This fatal error arises from memory allocation problem.
htmlspecialchars()
htmlentities()
Error
wordwrap()
23. To word wrap after a certain amount of characters.
wordwrap()
getrandmax()
Magic Constant
Object
24. Function used to find the absolute value of a number or numeric variable
preg_replace()
abs()
precedence
decimal
25. signed integer
rsort()
htmlspecialchars()
int
associative array
26. Function used to round down to the lowest integer
1
getrandmax()
ceil()
floor()
27. bitwise right shift
octal
float
integer
>>
28. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
count()
mysql_fetch_object()
wordwrap()
XML
29. To determine the amount of elements in an array
drop
count()
Constant
error_reporting (E_ALL)
30. A data structure that can hold a number of items of data of the same type eg. a list of names
array_merge()
true
WYSIWYG
array
31. Leading 0x: 0x13F or 0xA23
not
mysql_fetch_array()
Hex
chop()
32. To remove all HTML and PHP tags.
HTTP
variable
float
strip_tags()
33. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
empty()
>>
$_REQUEST
GET
34. Function used to round up to the highest integer
html_entity_decode()
associative array
fopen()
ceil()
35. To create an array
Hex
<?php
list()
array()
36. $_SERVER is a ________ variable.
preg_replace()
predefined
negative numbers
curly braces
37. Converts a string of ASCII characters to hexadecimal values
WYSIWYG
bin2hex()
str_ireplace()
curly braces
38. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
$_REQUEST
octal
single quotes
empty()
39. Shorthand used to increment and decrement
$var++ and $var
==
Array
is_numeric()
40. any programing language where the script is parsed on the server
ksort()
$_POST[]
server-side programing
control structure
41. An array of variables passed with <input /> data
parentheses
SGML
$_POST[]
null
42. Used to create a substring (referred to as a token) from a larger string
strtok()
the period; .
function error_reporting()
DTD
43. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
negative numbers
POST
indexed array
general
44. standard notation
integer
decimal
+= or -= or *= or /=
?>
45. To assign keys to the values in an array
mysql_fetch_object()
$_GET[]
array()
array
46. Function that contains the highest value that rand() can have randomly
if/elseif/else and switch statements
array_merge()
getrandmax()
floor()
47. the most basic function in PHP used to output information to the page
preg_match()
+
SGML
echo
48. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
nl2br()
error_reporting (E_ALL | E_STRICT)
Parse error
PHP
49. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
float
the period; .
crypt()
50. EXtensible Markup Language
XML
Notice
the period; .
strlen()