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. This error arises from misusing a function.
Warning
abs()
^
HTTP
2. Used to convert all HTML tags into their entity versions.
htmlentities()
substr_count()
isset()
$dbc = mysql_connect(hostname, username, password)
3. container of ordered data elements
Array
Warning
predefined variable
$dbc = mysql_connect(hostname, username, password)
4. _______ is a comparison operator
empty()
true
number_format()
!= inequality
5. does a certain action when called upon
$_POST[]
function
error_reporting (0)
strtok()
6. To iterate over the values of an array
+
for ($i = 0; $i < count($array); $i++) {statement(s);}
general
getrandmax()
7. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
Hex
substr_count()
curly braces
8. 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.
error_reporting (E_ALL | E_STRICT)
boolean
array
$_POST[]
9. To delete a variable or an element of an array
open source
parentheses
unset()
+
10. To determine the amount of elements in an array
count()
ksort()
<?php
parentheses
11. a language in which to make querys to a database with
sql
defined()
$varname[key]
drop
12. Returns a string with backslashes in front of the specified characters
$var++ and $var
index
abs()
addcslashes()
13. 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
14. bitwise right shift
>>
AJAX
defined()
addslashes()
15. Standard Generalized Markup Language
SGML
variable
error_reporting (E_ALL | E_STRICT)
the escape character ''
16. To sort the values while maintaining the correlation between each value and its key
addcslashes()
integer
PHP
asort()
17. This fatal error arises from memory allocation problem.
WYSIWYG
Error
GET
function error_reporting()
18. 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 __________.
open source
curly braces; ${$total}
error_reporting (E_ALL | E_STRICT)
wordwrap()
19. bitwise AND
the dollar sign $
&
$_GET[]
Warning
20. Creates a pointer to a file with the declared mode (read - write -etc.).
GET
DTD
fopen()
underscores
21. To refer to an item in an array
predefined variable
octal
$varname[key]
general
22. the most basic function in PHP used to output information to the page
negative numbers
Hex
echo
date()
23. a storage location in the computer's memory that has a type & a name and a contents
variable
mysql_close($dbc)
crypt()
chop()
24. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
chop()
arsort()
superglobal
numbers
25. To sort the values while maintaining the correlation between each value and its key - in reversed order
E_STRICT
null
strtok()
arsort()
26. any programing language where the script is parsed on the server
Shebang
rand()
server-side programing
Error
27. ___________ can be used with substr() to count backward
.=
negative numbers
DTD
numbers
28. To create an array
shuffle()
sql
reassign
array()
29. a positive or negative number
foreach loop
integer
isset()
ini_set ('display_errors', 1)
30. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
POST
DTD
sort()
array_merge()
31. signed floating-point value
float
array()
predefined
precedence
32. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
wordwrap()
E_STRICT
array
curly braces
33. The three types of loops in PHP are: for - while - ____.
Constant
Parse error
foreach
substr_count()
34. Define(NAME,value)
rsort()
fopen()
Constant
wordwrap()
35. The name of the #! used to designate the location of the PHP binary
Shebang
HTML
echo
Magic Constant
36. collection of binary data
string
substr_count()
mysql_close($dbc)
$varname[key]
37. container of both data and code
function error_reporting()
if/elseif/else and switch statements
$$
Object
38. Document Type Definitions
not
SGML
array()
DTD
39. Asynchronous Javascript And XML
int
array()
for ($i = 0; $i < count($array); $i++) {statement(s);}
AJAX
40. signed integer
array()
decimal
int
define()
41. To assign array element values to individual variables
$varname[key]
error_reporting (E_ALL & -E_NOTICE)
floor()
list()
42. Use ______ when there are no variables in the string
curly braces; ${$total}
array()
Hex
single quotes
43. bitwise XOR
^
the period; .
array()
!= inequality
44. When used the value can be passed safely through the URL (GET).
str_word_count()
decimal
===
urlencode()
45. Function can you use to format a number with commas
number_format()
server-side programing
single quotes
Parse error
46. Variable names can begin with __________
<?php
curly braces; ${$total}
$_POST[]
underscores
47. print $_SERVER will _____ work if you use the print function on arrays.
not
client-side programing
chop()
single quotes
48. Uses two arguments: constant name and constant definition
asort()
define()
$_POST[]
Shebang
49. _____ is a logical operator
index
html_entity_decode()
XOR
.=
50. The syntax for connecting to a database
float
associative array
$dbc = mysql_connect(hostname, username, password)
SEO