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. equivalence
function error_reporting()
==
unset()
asort()
2. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
server-side programing
foreach loop
abs()
3. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
strlen()
POST
<?php
control structure
4. Function used to find the absolute value of a number or numeric variable
parentheses
single quotes
abs()
htmlspecialchars()
5. Use ________ to have multiple quotations in one string
the escape character ''
$$
urlencode()
str_word_count()
6. To check if a constant is already declared
chop()
defined()
Shebang
statement
7. 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 __________.
+
empty()
curly braces; ${$total}
floor()
8. Returns a character from a specified ASCII value
chr()
not
int
ksort()
9. $_SERVER is a ________ variable.
predefined
?>
$_POST[]
ini_set ('display_errors', 1)
10. The syntax for connecting to a database
if/elseif/else and switch statements
define()
$dbc = mysql_connect(hostname, username, password)
&
11. This error arises from misusing a function.
Warning
Shebang
addslashes()
urlencode()
12. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
parentheses
$_GET[]
XOR
13. function Function used to create a random number
XOR
rand()
define()
superglobal
14. This will show all error reporting.
drop
bin2hex()
htmlentities()
error_reporting (E_ALL)
15. A data structure that can hold a number of items of data of the same type eg. a list of names
statement
array
mysql_fetch_object()
strtok()
16. ____ or key is referred to for a value within an array.
int
index
strlen()
array
17. To set up error reporting
function error_reporting()
getrandmax()
predefined
Parse error
18. Active Server Pages
crypt()
ASP
html_entity_decode()
==
19. Alias of rtrim()
sql
<?php
switch
chop()
20. To sort values of an array without regard to the keys
sort()
Parse error
error_reporting (E_ALL)
nl2br()
21. Use ______ when there are no variables in the string
ceil()
single quotes
number_format()
addslashes()
22. To declare a constant
ceil()
ASP
predefined
define()
23. Uses two arguments: constant name and constant definition
boolean
echo
getrandmax()
define()
24. Used to find the length of a string
octal
strlen()
null
drop
25. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
negative numbers
GET
substr_count()
general
26. To find how many substrings are in a string
is_numeric()
<<
octal
substr_count()
27. Function used to round down to the lowest integer
the period; .
preg_split()
floor()
array()
28. To assign keys to the values in an array
array()
include() and require()
loops
HTTP
29. bitwise XOR
GET
^
mysql_fetch_array()
string
30. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
int
sql
$array[] = item
date()
31. bitwise right shift
str_ireplace()
>>
<<
if/elseif/else and switch statements
32. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
round() Function
urlencode()
+
33. a storage location in the computer's memory that has a type & a name and a contents
variable
shuffle()
number_format()
fopen()
34. _____ is a logical operator
the period; .
switch
XOR
function
35. To sort values of an array in reversed order
rsort()
numbers
is_numeric()
arsort()
36. standard notation
html_entity_decode()
&
foreach loop
decimal
37. leading zero: 0100 or 0567
Array
octal
function
double quotes
38. To sort by the keys while maintaining the correlation between the key and its value
shuffle()
crypt()
control structure
ksort()
39. The name of the #! used to designate the location of the PHP binary
unset()
arsort()
mysql_fetch_array()
Shebang
40. An array whose keys are numbers.
ceil()
open source
indexed array
error_reporting (0)
41. All variables must begin with _________.
predefined
the dollar sign $
str_ireplace()
$var++ and $var
42. Control structures that break exit
if/elseif/else and switch statements
&
indexed array
boolean
43. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
float
empty()
reassign
chop()
44. collection of binary data
predefined variable
string
single quotes
htmlentities()
45. Used to convert all HTML tags into their entity versions.
SEO
htmlentities()
+
PHP
46. PHP has two conditional: if and ______.
list()
switch
==
Parse error
47. bitwise AND
^
foreach
&
predefined variable
48. _________ can be used in conditional statements to set precedence
$$
negative numbers
parentheses
asort()
49. Returns a string with backslashes in front of the specified characters
statement
addcslashes()
mysql_close($dbc)
switch
50. Hypertext Preprocessor - a server-side programing language used to create webpages
date()
addcslashes()
PHP
variable