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. To refer to an item in an array
boolean
function
$varname[key]
the period; .
2. The output of var_export((float)array(0));
1
htmlspecialchars()
the escape character ''
&
3. Use ______ when there are no variables in the string
precedence
single quotes
getrandmax()
wordwrap()
4. When used the value can be passed safely through the URL (GET).
===
urlencode()
the period; .
sort()
5. To set up error reporting
SGML
number_format()
float
function error_reporting()
6. To determine the amount of elements in an array
count()
curly braces
preg_split()
html_entity_decode()
7. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
mysql_fetch_object()
Parse error
DTD
server-side programing
8. signed integer
shuffle()
$_SESSION[]
int
precedence
9. All variables must begin with _________.
the dollar sign $
defined()
Constant
server-side programing
10. Converts a string of ASCII characters to hexadecimal values
bin2hex()
1
abs()
crypt()
11. The four main error types are:Notice - Warning - ________ and Error.
general
Parse error
include() and require()
unset()
12. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
GET
numbers
mysql_close($dbc)
13. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
.=
predefined
strlen()
14. Function can you use to format a number with commas
chr()
number_format()
Object
mysql
15. Used to convert all HTML tags into their entity versions.
$_SESSION[]
the escape character ''
strip_tags()
htmlentities()
16. An array of variables passed in the URL
POST
echo
$_GET[]
==
17. $_SERVER is a ________ variable.
strip_tags()
predefined
POST
reassign
18. a language in which to make querys to a database with
$varname[key]
Warning
ini_set ('display_errors', 1)
sql
19. collection of binary data
Notice
round() Function
$array[] = item
string
20. either hasn't yet been set or is assigned NULL value
count()
error_reporting (E_ALL & -E_NOTICE)
null
str_word_count()
21. Used to encrypt values - it is a one-way encryption method
===
curly braces
crypt()
urlencode()
22. standard notation
decimal
int
isset()
1
23. To merge arrays
mysql
&
general
array_merge()
24. equivalence
parentheses
==
float
preg_replace()
25. Tag to begin a php script
Magic Constant
curly braces
<?php
array
26. This error refers to a variable with no value.
Notice
open source
not
predefined
27. The three types of loops in PHP are: for - while - ____.
function
Object
foreach
htmlentities()
28. An array whose keys are numbers.
arsort()
switch
indexed array
HTTP
29. bitwise AND
variable
&
superglobal
preg_replace()
30. To find how many substrings are in a string
Notice
double quotes
substr_count()
htmlspecialchars()
31. Used to find the length of a string
$$
Parse error
strlen()
AJAX
32. The array that stores variables specific to a user's visit
underscores
defined()
$_SESSION[]
PHP
33. What You See Is What You Get
$array[] = item
the dollar sign $
WYSIWYG
curly braces
34. used to round numeric values.
control structure
error_reporting (E_ALL | E_STRICT)
round() Function
switch
35. Creates a pointer to a file with the declared mode (read - write -etc.).
Notice
count()
general
fopen()
36. $_POST and $_GET are ________ variables.
predefined
$var++ and $var
true
echo
37. Function used to round down to the lowest integer
floor()
sql
superglobal
rsort()
38. PHP has two conditional: if and ______.
precedence
Parse error
switch
if/elseif/else and switch statements
39. a storage location in the computer's memory that has a type & a name and a contents
the dollar sign $
variable
foreach
curly braces
40. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$_SESSION[]
^
$array[] = item
chop()
41. Used to check if a variable has a valid numerical value; strings with numerical values pass.
server-side programing
is_numeric()
fopen()
strip_tags()
42. leading zero: 0100 or 0567
client-side programing
function error_reporting()
preg_split()
octal
43. This will show all error reporting except for notice errors.
index
SEO
strtok()
error_reporting (E_ALL & -E_NOTICE)
44. To sort the values while maintaining the correlation between each value and its key - in reversed order
the dollar sign $
decimal
preg_match()
arsort()
45. Hyper Text Markup Language
int
^
strip_tags()
HTML
46. bitwise XOR
floor()
control structure
$_REQUEST
^
47. An array whose keys are strings; also known as a hash.
associative array
function error_reporting()
addcslashes()
Shebang
48. identity
array()
$dbc = mysql_connect(hostname, username, password)
===
htmlentities()
49. The prefix for a dynamic variable - also known as a variable variable
arsort()
$_SESSION[]
$$
asort()
50. To check if a constant is already declared
defined()
server-side programing
the dollar sign $
number_format()