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. a positive or negative number
integer
==
$_GET[]
octal
2. a language in which to make querys to a database with
===
sql
loops
not
3. To word wrap after a certain amount of characters.
0
wordwrap()
Parse error
curly braces
4. _____ is a logical operator
array_merge()
XOR
variable
==
5. Control structures that break exit
if/elseif/else and switch statements
PHP
ini_set ('display_errors', 1)
define()
6. Online applications and resources which are available to the general public with very few restrictions
define()
associative array
open source
string
7. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
AJAX
preg_split()
Parse error
getrandmax()
8. Use ________ to have multiple quotations in one string
open source
the escape character ''
$array[] = item
<<
9. Use ______ when a variable contains any amount of variables; in general.
mysql
$array[] = item
double quotes
1
10. Used to convert certain HTML tags into their entity versions.
htmlspecialchars()
wordwrap()
Shebang
null
11. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
underscores
string
nl2br()
GET
12. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
error_reporting (E_ALL)
html_entity_decode()
$_REQUEST
double quotes
13. Search Engine Optimization
Hex
error_reporting (E_ALL & -E_NOTICE)
SEO
decimal
14. An array of variables passed with <input /> data
isset()
include() and require()
$_SESSION[]
$_POST[]
15. EXtensible Markup Language
XML
$_GET[]
ksort()
mysql_fetch_object()
16. To declare a constant
abs()
if/elseif/else and switch statements
define()
chr()
17. This fatal error arises from memory allocation problem.
Error
mysql_close($dbc)
Shebang
substr_count()
18. Use ______ when there are no variables in the string
single quotes
SGML
list()
function
19. To create an array
SGML
error_reporting (E_ALL)
array()
reassign
20. To assign array element values to individual variables
associative array
preg_replace()
list()
the dollar sign $
21. Used to encrypt values - it is a one-way encryption method
SEO
crypt()
!= inequality
mysql_fetch_array()
22. This will show all error reporting except for notice errors.
precedence
error_reporting (E_ALL & -E_NOTICE)
!= inequality
variable
23. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
XOR
$dbc = mysql_connect(hostname, username, password)
bin2hex()
24. This error refers to a variable with no value.
preg_match()
Notice
double quotes
chr()
25. To counter htmlentities()
error_reporting (0)
html_entity_decode()
^
index
26. $_SERVER is a ________ variable.
predefined
getrandmax()
addcslashes()
$_SESSION[]
27. leading zero: 0100 or 0567
octal
$dbc = mysql_connect(hostname, username, password)
variable
predefined
28. Tag to begin a php script
switch
decimal
html_entity_decode()
<?php
29. To assign keys to the values in an array
array()
foreach
single quotes
Object
30. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
strlen()
not
array()
31. Returns a character from a specified ASCII value
control structure
chr()
shuffle()
strlen()
32. A data structure that can hold a number of items of data of the same type eg. a list of names
array
foreach loop
drop
substr_count()
33. The ouput of var_export((bool)"NULL");
mysql_close($dbc)
true
rsort()
associative array
34. used to round numeric values.
nl2br()
round() Function
>>
html_entity_decode()
35. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
string
predefined
mysql
36. Function can you use to format a number with commas
number_format()
Notice
date()
error_reporting (E_ALL | E_STRICT)
37. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
DTD
empty()
XOR
$_GET[]
38. The prefix for a dynamic variable - also known as a variable variable
$dbc = mysql_connect(hostname, username, password)
$$
Object
fopen()
39. To remove all HTML and PHP tags.
strip_tags()
htmlspecialchars()
AJAX
sql
40. Uses two arguments: constant name and constant definition
===
define()
curly braces; ${$total}
is_numeric()
41. To determine the amount of elements in an array
count()
E_STRICT
predefined
general
42. This will not show error reporting - it will be turned off.
strip_tags()
POST
error_reporting (0)
empty()
43. Function that contains the highest value that rand() can have randomly
XML
chop()
getrandmax()
error_reporting (E_ALL | E_STRICT)
44. Hypertext Preprocessor - a server-side programing language used to create webpages
Constant
is_numeric()
boolean
PHP
45. equivalence
associative array
variable
==
predefined variable
46. the most basic function in PHP used to output information to the page
control structure
date()
echo
numbers
47. To get time data
date()
rsort()
Array
preg_match()
48. _______ is a comparison operator
define()
error_reporting (E_ALL & -E_NOTICE)
parentheses
!= inequality
49. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
negative numbers
Magic Constant
abs()
PHP
50. print $_SERVER will _____ work if you use the print function on arrays.
not
array()
addcslashes()
predefined variable