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. addition
+
nl2br()
the dollar sign $
$array[] = item
2. A conditional or loop is a ________________.
control structure
E_STRICT
array()
Parse error
3. To check if a constant is already declared
preg_replace()
error_reporting (0)
server-side programing
defined()
4. The output of var_export((float)array(0));
1
array_merge()
.=
mysql_fetch_object()
5. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
$_POST[]
general
Shebang
6. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_object()
associative array
mysql_fetch_array()
Notice
7. To counter htmlentities()
define()
PHP
HTTP
html_entity_decode()
8. Used to find the length of a string
defined()
strlen()
control structure
function
9. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
$_SESSION[]
sql
trim()
unset()
10. To reorganise the array randomly
control structure
shuffle()
$var++ and $var
Constant
11. Online applications and resources which are available to the general public with very few restrictions
decimal
open source
chop()
PHP
12. container of ordered data elements
DTD
Array
.=
date()
13. To refer to an item in an array
addcslashes()
getrandmax()
$varname[key]
echo
14. print $_SERVER will _____ work if you use the print function on arrays.
control structure
not
empty()
str_ireplace()
15. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
general
function error_reporting()
!= inequality
WYSIWYG
16. 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 __________.
curly braces; ${$total}
XOR
Error
AJAX
17. TRUE or FALSE
SGML
strlen()
XOR
boolean
18. bitwise XOR
isset()
$_POST[]
^
Constant
19. The ouput of var_export((bool)"NULL");
Shebang
^
true
not
20. Shorthand used to increment and decrement
Parse error
$var++ and $var
POST
function
21. Used to convert certain HTML tags into their entity versions.
predefined variable
htmlspecialchars()
underscores
1
22. An array of variables passed with <input /> data
double quotes
1
str_ireplace()
$_POST[]
23. bitwise left shift
preg_replace()
<<
addcslashes()
wordwrap()
24. To assign array element values to individual variables
chop()
list()
abs()
precedence
25. A data structure that can hold a number of items of data of the same type eg. a list of names
<<
array
$dbc = mysql_connect(hostname, username, password)
error_reporting (E_ALL)
26. Tag to end a php script
E_STRICT
SGML
?>
index
27. To word wrap after a certain amount of characters.
wordwrap()
$_REQUEST
$_GET[]
index
28. any programing language where the user must support the language the script is written in
client-side programing
int
Notice
boolean
29. To sort the values while maintaining the correlation between each value and its key
DTD
XML
asort()
floor()
30. signed integer
index
variable
control structure
int
31. Used to create a substring (referred to as a token) from a larger string
is_numeric()
rsort()
strtok()
strip_tags()
32. Alias of rtrim()
chop()
not
int
echo
33. Function can you use to format a number with commas
for ($i = 0; $i < count($array); $i++) {statement(s);}
rsort()
the period; .
number_format()
34. The concatenation operator?
PHP
array()
the period; .
boolean
35. Leading 0x: 0x13F or 0xA23
str_word_count()
mysql_fetch_object()
foreach loop
Hex
36. a language in which to make querys to a database with
sql
str_word_count()
HTTP
PHP
37. Control structure that continue exit - they perform specific statements for a determined number of iterations.
error_reporting (E_ALL | E_STRICT)
E_STRICT
mysql
loops
38. This error arises from misusing a function.
$array[] = item
mysql
Warning
Parse error
39. This will not show error reporting - it will be turned off.
str_ireplace()
error_reporting (0)
htmlentities()
$$
40. the most basic function in PHP used to output information to the page
.=
echo
WYSIWYG
strtok()
41. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
for ($i = 0; $i < count($array); $i++) {statement(s);}
getrandmax()
nl2br()
substr_count()
42. used to round numeric values.
$$
WYSIWYG
abs()
round() Function
43. Variable names can begin with __________
switch
underscores
.=
HTML
44. This will show all error reporting except for notice errors.
boolean
error_reporting (E_ALL & -E_NOTICE)
array()
trim()
45. An array whose keys are strings; also known as a hash.
html_entity_decode()
associative array
Shebang
1
46. This error refers to a variable with no value.
PHP
list()
Notice
string
47. Search Engine Optimization
chop()
unset()
$varname[key]
SEO
48. To reset an array _______ the array() function to the array
$_GET[]
chop()
reassign
<?php
49. a database which is best supported by PHP
mysql
array()
define()
defined()
50. What You See Is What You Get
XML
$array[] = item
single quotes
WYSIWYG