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. When used the value can be passed safely through the URL (GET).
int
mysql_fetch_object()
mysql_close($dbc)
urlencode()
2. Asynchronous Javascript And XML
rsort()
AJAX
$$
.=
3. The four main error types are:Notice - Warning - ________ and Error.
echo
Parse error
decimal
Notice
4. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
general
string
underscores
5. Returns a string with backslashes in front of the specified characters
addcslashes()
control structure
HTML
true
6. _________ can be used in conditional statements to set precedence
wordwrap()
Array
precedence
parentheses
7. PHP has two conditional: if and ______.
switch
if/elseif/else and switch statements
$var++ and $var
ksort()
8. Leading 0x: 0x13F or 0xA23
precedence
strip_tags()
Hex
not
9. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
ceil()
$array[] = item
negative numbers
empty()
10. $_POST and $_GET are ________ variables.
curly braces; ${$total}
define()
$$
predefined
11. To check if a constant is already declared
defined()
integer
$_REQUEST
.=
12. To iterate over the keys and values of an array
drop
foreach loop
Notice
$varname[key]
13. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
html_entity_decode()
crypt()
associative array
14. Alias of rtrim()
==
reassign
error_reporting (E_ALL)
chop()
15. 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)
octal
?>
client-side programing
16. Used to convert certain HTML tags into their entity versions.
>>
htmlspecialchars()
Object
mysql_fetch_array()
17. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
array
asort()
mysql_close($dbc)
18. To word wrap after a certain amount of characters.
wordwrap()
$_SESSION[]
Object
rand()
19. To remove all HTML and PHP tags.
floor()
general
indexed array
strip_tags()
20. signed integer
sort()
1
int
sql
21. To include files - _______ will give errors and _________ will terminate execution().
rsort()
include() and require()
strlen()
Warning
22. This error refers to a variable with no value.
parentheses
Parse error
preg_match()
Notice
23. a storage location in the computer's memory that has a type & a name and a contents
variable
general
urlencode()
.=
24. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
client-side programing
Magic Constant
mysql_fetch_object()
asort()
25. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
curly braces; ${$total}
getrandmax()
$array[] = item
if/elseif/else and switch statements
26. What You See Is What You Get
underscores
WYSIWYG
empty()
client-side programing
27. _____ is a logical operator
XOR
Parse error
!= inequality
double quotes
28. Standard Generalized Markup Language
null
SGML
XML
indexed array
29. Returns a string with backslashes in front of predefined characters
addslashes()
str_word_count()
the dollar sign $
error_reporting (E_ALL & -E_NOTICE)
30. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
function
null
array()
31. Hyper Text Transfer Protocol
boolean
HTTP
$dbc = mysql_connect(hostname, username, password)
trim()
32. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
define()
GET
Warning
E_STRICT
33. Control structure that continue exit - they perform specific statements for a determined number of iterations.
function
loops
$_REQUEST
superglobal
34. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
predefined
single quotes
mysql
drop
35. To refer to an item in an array
$varname[key]
fopen()
?>
Error
36. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
if/elseif/else and switch statements
predefined
getrandmax()
37. Returns a character from a specified ASCII value
$_POST[]
<<
chr()
general
38. collection of binary data
Shebang
string
error_reporting (0)
GET
39. Uses two arguments: constant name and constant definition
array_merge()
Constant
int
define()
40. ____ or key is referred to for a value within an array.
index
number_format()
Parse error
the dollar sign $
41. Search Engine Optimization
SEO
+= or -= or *= or /=
ksort()
GET
42. The name of the #! used to designate the location of the PHP binary
predefined
Shebang
trim()
reassign
43. says 'if' this then do this 'else' do this or 'while' this do this
mysql_fetch_object()
statement
string
0
44. 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
45. TRUE or FALSE
strlen()
SEO
boolean
XML
46. function Function used to create a random number
str_word_count()
rand()
switch
SEO
47. To declare a constant
GET
numbers
double quotes
define()
48. Creates a pointer to a file with the declared mode (read - write -etc.).
ini_set ('display_errors', 1)
fopen()
open source
numbers
49. identity
1
PHP
===
count()
50. Used to check if a variable has a valid numerical value; strings with numerical values pass.
==
negative numbers
indexed array
is_numeric()