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 append elements to an array - this will assign item to the next available index; associative arrays get messy.
addcslashes()
$array[] = item
&
array_merge()
2. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
mysql_fetch_object()
1
not
3. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
XML
rand()
predefined variable
4. equivalence
error_reporting (E_ALL & -E_NOTICE)
mysql_fetch_array()
SEO
==
5. a type with two possible values: true and false
strlen()
boolean
SEO
reassign
6. searches the subject for matches to a given pattern replaced with the given replacement text
0
str_ireplace()
preg_replace()
E_STRICT
7. To sort values of an array in reversed order
substr_count()
strip_tags()
rsort()
preg_replace()
8. a storage location in the computer's memory that has a type & a name and a contents
curly braces
html_entity_decode()
htmlentities()
variable
9. Shorthand used to increment and decrement
$$
$var++ and $var
predefined
preg_match()
10. _____ is a logical operator
error_reporting (E_ALL)
XOR
define()
0
11. Document Type Definitions
ini_set ('display_errors', 1)
sort()
DTD
chr()
12. To refer to an item in an array
$varname[key]
ASP
$_REQUEST
Error
13. The prefix for a dynamic variable - also known as a variable variable
Parse error
$$
<<
DTD
14. Used to create a substring (referred to as a token) from a larger string
strtok()
round() Function
error_reporting (E_ALL | E_STRICT)
Hex
15. Uses two arguments: constant name and constant definition
define()
Hex
include() and require()
underscores
16. _______ is a comparison operator
string
!= inequality
$var++ and $var
$_REQUEST
17. The order of operations.
abs()
error_reporting (E_ALL | E_STRICT)
precedence
wordwrap()
18. any programing language where the user must support the language the script is written in
wordwrap()
error_reporting (0)
client-side programing
parentheses
19. used to round numeric values.
round() Function
mysql_fetch_object()
$_REQUEST
1
20. container of both data and code
Hex
Object
preg_split()
general
21. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
floor()
GET
Object
E_STRICT
22. An array of variables passed in the URL
list()
$_GET[]
boolean
==
23. To sort by the keys while maintaining the correlation between the key and its value
DTD
predefined
ksort()
Error
24. To sort the values while maintaining the correlation between each value and its key - in reversed order
Parse error
arsort()
+= or -= or *= or /=
strtok()
25. To merge arrays
SEO
array_merge()
array()
null
26. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
error_reporting (0)
array()
Hex
Magic Constant
27. Function that contains the highest value that rand() can have randomly
SGML
chop()
&
getrandmax()
28. Leading 0x: 0x13F or 0xA23
AJAX
reassign
Hex
addslashes()
29. To reset an array _______ the array() function to the array
reassign
1
underscores
0
30. Control structures that break exit
if/elseif/else and switch statements
echo
count()
abs()
31. ____ or key is referred to for a value within an array.
error_reporting (E_ALL & -E_NOTICE)
index
precedence
Warning
32. What You See Is What You Get
boolean
+= or -= or *= or /=
WYSIWYG
integer
33. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
string
empty()
int
ceil()
34. The name of the #! used to designate the location of the PHP binary
rsort()
echo
Shebang
curly braces; ${$total}
35. a language in which to make querys to a database with
switch
sql
date()
array()
36. Use ______ when there are no variables in the string
preg_replace()
abs()
single quotes
empty()
37. The four main error types are:Notice - Warning - ________ and Error.
curly braces
fopen()
Parse error
===
38. $_POST Data sent using POST found is sent to _______
predefined variable
0
rsort()
superglobal
39. Hyper Text Transfer Protocol
echo
HTTP
E_STRICT
$_REQUEST
40. An array whose keys are numbers.
<?php
E_STRICT
indexed array
predefined variable
41. To assign keys to the values in an array
numbers
array
string
array()
42. Function used to round down to the lowest integer
decimal
html_entity_decode()
floor()
Array
43. All variables must begin with _________.
the dollar sign $
define()
defined()
include() and require()
44. A data structure that can hold a number of items of data of the same type eg. a list of names
array_merge()
array
unset()
htmlentities()
45. identity
float
curly braces
===
predefined variable
46. a line of information that can be stored in a variable or used in a function or statement
floor()
string
if/elseif/else and switch statements
predefined variable
47. The three types of loops in PHP are: for - while - ____.
urlencode()
foreach
getrandmax()
Magic Constant
48. To reorganise the array randomly
ksort()
array
float
shuffle()
49. collection of binary data
string
Parse error
rsort()
boolean
50. leading zero: 0100 or 0567
octal
bin2hex()
^
$array[] = item