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. print $_SERVER will _____ work if you use the print function on arrays.
addcslashes()
function
not
$$
2. A conditional or loop is a ________________.
float
negative numbers
substr_count()
control structure
3. The four main error types are:Notice - Warning - ________ and Error.
boolean
addslashes()
wordwrap()
Parse error
4. Active Server Pages
control structure
===
associative array
ASP
5. Use ________ to have multiple quotations in one string
array()
client-side programing
addcslashes()
the escape character ''
6. $_POST Data sent using POST found is sent to _______
predefined variable
!= inequality
substr_count()
E_STRICT
7. Used to encrypt values - it is a one-way encryption method
mysql_fetch_object()
htmlentities()
crypt()
htmlspecialchars()
8. a positive or negative number
Warning
preg_split()
ASP
integer
9. ___________ can be used with substr() to count backward
strlen()
int
negative numbers
error_reporting (0)
10. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
Warning
open source
is_numeric()
trim()
11. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
Warning
error_reporting (0)
str_word_count()
12. Shorthand used to increment and decrement
array()
$var++ and $var
Warning
XML
13. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
Warning
predefined variable
E_STRICT
rand()
14. any programing language where the script is parsed on the server
server-side programing
HTTP
general
Notice
15. $_SERVER is a ________ variable.
chop()
if/elseif/else and switch statements
predefined
rand()
16. Variable names cannot begin with _______
HTML
echo
numbers
addcslashes()
17. Define(NAME,value)
foreach
preg_replace()
$array[] = item
Constant
18. To determine the amount of elements in an array
the period; .
$array[] = item
count()
$varname[key]
19. a type with two possible values: true and false
addslashes()
integer
boolean
associative array
20. bitwise AND
&
Constant
$varname[key]
curly braces; ${$total}
21. To check if a constant is already declared
defined()
wordwrap()
Parse error
preg_replace()
22. signed integer
associative array
parentheses
int
1
23. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
define()
preg_split()
DTD
24. To find how many substrings are in a string
ksort()
count()
substr_count()
error_reporting (E_ALL & -E_NOTICE)
25. Online applications and resources which are available to the general public with very few restrictions
foreach
loops
open source
not
26. Hypertext Preprocessor - a server-side programing language used to create webpages
the escape character ''
PHP
for ($i = 0; $i < count($array); $i++) {statement(s);}
ini_set ('display_errors', 1)
27. To reset an array _______ the array() function to the array
shuffle()
trim()
reassign
bin2hex()
28. To assign array element values to individual variables
list()
html_entity_decode()
for ($i = 0; $i < count($array); $i++) {statement(s);}
curly braces; ${$total}
29. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
define()
HTTP
Warning
30. Used to convert all HTML tags into their entity versions.
function
PHP
htmlentities()
error_reporting (E_ALL)
31. $_POST and $_GET are ________ variables.
predefined
superglobal
control structure
list()
32. To declare a constant
switch
0
asort()
define()
33. To sort values of an array in reversed order
Hex
the dollar sign $
predefined
rsort()
34. An array whose keys are numbers.
true
define()
>>
indexed array
35. To iterate over the keys and values of an array
true
date()
index
foreach loop
36. a storage location in the computer's memory that has a type & a name and a contents
Constant
variable
is_numeric()
predefined variable
37. An array whose keys are strings; also known as a hash.
drop
$_POST[]
number_format()
associative array
38. ____ or key is referred to for a value within an array.
foreach loop
HTML
index
count()
39. EXtensible Markup Language
single quotes
for ($i = 0; $i < count($array); $i++) {statement(s);}
XML
control structure
40. To remove all HTML and PHP tags.
indexed array
strip_tags()
client-side programing
crypt()
41. Function used to find the absolute value of a number or numeric variable
boolean
abs()
1
strip_tags()
42. The name of the #! used to designate the location of the PHP binary
curly braces; ${$total}
Shebang
<?php
echo
43. Function that contains the highest value that rand() can have randomly
strip_tags()
getrandmax()
precedence
reassign
44. 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 __________.
true
nl2br()
curly braces; ${$total}
preg_replace()
45. the most basic function in PHP used to output information to the page
strlen()
echo
error_reporting (E_ALL | E_STRICT)
unset()
46. Used to display errors in a particular script - should be placed at top of script.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
47. The ouput of var_export((bool)"NULL");
true
preg_replace()
list()
variable
48. Used to find the length of a string
curly braces; ${$total}
Array
htmlentities()
strlen()
49. collection of binary data
string
$_SESSION[]
>>
ASP
50. Tag to end a php script
isset()
?>
XOR
urlencode()