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. Function used to round down to the lowest integer
function
float
Constant
floor()
2. This error arises from misusing a function.
octal
===
negative numbers
Warning
3. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
not
the dollar sign $
string
GET
4. To set up error reporting
negative numbers
function error_reporting()
crypt()
true
5. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
client-side programing
mysql_fetch_object()
>>
strip_tags()
6. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
preg_match()
addslashes()
nl2br()
parentheses
7. Used to replace a substring with another string - it is not case-sensitive.
mysql_fetch_object()
precedence
?>
str_ireplace()
8. To counter htmlentities()
html_entity_decode()
predefined variable
SEO
array()
9. Used to check if a variable has any value (including 0 or FALSE or an empty string).
echo
HTML
wordwrap()
isset()
10. Hyper Text Markup Language
Parse error
HTML
DTD
<?php
11. Leading 0x: 0x13F or 0xA23
Hex
mysql_close($dbc)
curly braces
null
12. bitwise right shift
server-side programing
>>
not
underscores
13. To delete a variable or an element of an array
nl2br()
E_STRICT
mysql_fetch_object()
unset()
14. $_SERVER is a ________ variable.
getrandmax()
predefined
$$
general
15. bitwise left shift
str_word_count()
$varname[key]
<<
$dbc = mysql_connect(hostname, username, password)
16. The output of var_export((float)array());
0
+= or -= or *= or /=
Notice
predefined variable
17. Asynchronous Javascript And XML
wordwrap()
AJAX
is_numeric()
htmlentities()
18. Function used to round up to the highest integer
Error
ceil()
asort()
1
19. Control structure that continue exit - they perform specific statements for a determined number of iterations.
array
rsort()
array()
loops
20. a line of information that can be stored in a variable or used in a function or statement
predefined
negative numbers
single quotes
string
21. equivalence
the escape character ''
$_REQUEST
==
ksort()
22. $_POST and $_GET are ________ variables.
+
floor()
predefined
define()
23. Used to find the amount of words in a string.
str_word_count()
nl2br()
$_POST[]
round() Function
24. To remove all HTML and PHP tags.
strip_tags()
predefined
true
urlencode()
25. _________ can be used in conditional statements to set precedence
parentheses
strlen()
preg_split()
boolean
26. A data structure that can hold a number of items of data of the same type eg. a list of names
SGML
underscores
index
array
27. The name of the #! used to designate the location of the PHP binary
list()
^
function
Shebang
28. Define(NAME,value)
the period; .
Constant
curly braces
Shebang
29. 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.
general
switch
error_reporting (E_ALL | E_STRICT)
$dbc = mysql_connect(hostname, username, password)
30. 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 __________.
$dbc = mysql_connect(hostname, username, password)
curly braces; ${$total}
general
html_entity_decode()
31. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
substr_count()
foreach
<<
empty()
32. addition
Error
+
shuffle()
HTTP
33. All variables must begin with _________.
predefined variable
the dollar sign $
include() and require()
preg_match()
34. Tag to begin a php script
<?php
shuffle()
?>
$_SESSION[]
35. To close a connection between a database
preg_split()
HTTP
array()
mysql_close($dbc)
36. leading zero: 0100 or 0567
Constant
$array[] = item
!= inequality
octal
37. To assign array element values to individual variables
mysql_close($dbc)
asort()
HTML
list()
38. To determine the amount of elements in an array
general
count()
double quotes
GET
39. To sort values of an array without regard to the keys
+
sort()
abs()
date()
40. To reorganise the array randomly
$$
+= or -= or *= or /=
wordwrap()
shuffle()
41. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
function
abs()
int
$array[] = item
42. To find how many substrings are in a string
substr_count()
ksort()
XOR
$_SESSION[]
43. returns the number of matches found by a given search string under this format...
preg_match()
WYSIWYG
+
true
44. Hyper Text Transfer Protocol
arsort()
HTTP
mysql_fetch_array()
floor()
45. _______ is a comparison operator
superglobal
Magic Constant
addslashes()
!= inequality
46. bitwise AND
&
integer
urlencode()
mysql_close($dbc)
47. a storage location in the computer's memory that has a type & a name and a contents
POST
foreach
variable
E_STRICT
48. PHP has two conditional: if and ______.
predefined
+= or -= or *= or /=
strlen()
switch
49. Use ______ when a variable contains any amount of variables; in general.
WYSIWYG
double quotes
trim()
addslashes()
50. To reset an array _______ the array() function to the array
shuffle()
rand()
reassign
XOR