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 iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
control structure
chop()
array_merge()
2. a language in which to make querys to a database with
substr_count()
sql
superglobal
switch
3. To merge arrays
Warning
mysql_close($dbc)
round() Function
array_merge()
4. a type with two possible values: true and false
boolean
array_merge()
client-side programing
include() and require()
5. The concatenation operator?
wordwrap()
indexed array
E_STRICT
the period; .
6. Used to convert certain HTML tags into their entity versions.
htmlspecialchars()
POST
preg_replace()
error_reporting (E_ALL & -E_NOTICE)
7. To counter htmlentities()
>>
strtok()
rsort()
html_entity_decode()
8. print $_SERVER will _____ work if you use the print function on arrays.
not
floor()
fopen()
SGML
9. Function can you use to format a number with commas
addcslashes()
negative numbers
$dbc = mysql_connect(hostname, username, password)
number_format()
10. returns the number of matches found by a given search string under this format...
superglobal
round() Function
preg_match()
octal
11. Used to check if a variable has any value (including 0 or FALSE or an empty string).
predefined variable
isset()
ASP
associative array
12. 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.
E_STRICT
asort()
error_reporting (E_ALL | E_STRICT)
int
13. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
Shebang
parentheses
SEO
nl2br()
14. $_POST Data sent using POST found is sent to _______
POST
predefined variable
single quotes
precedence
15. This fatal error arises from memory allocation problem.
nl2br()
Error
array()
$_GET[]
16. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
urlencode()
XML
str_word_count()
POST
17. Variable names cannot begin with _______
numbers
preg_match()
Magic Constant
int
18. EXtensible Markup Language
^
SEO
empty()
XML
19. When used the value can be passed safely through the URL (GET).
E_STRICT
urlencode()
0
array
20. To set up error reporting
Magic Constant
function error_reporting()
preg_replace()
error_reporting (E_ALL & -E_NOTICE)
21. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
double quotes
getrandmax()
array
mysql_fetch_array()
22. Used to encrypt values - it is a one-way encryption method
crypt()
$_SESSION[]
XML
POST
23. $_SERVER is a ________ variable.
round() Function
str_ireplace()
getrandmax()
predefined
24. Used to find the length of a string
?>
>>
Error
strlen()
25. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
arsort()
GET
empty()
boolean
26. 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
27. Used to check if a variable has a valid numerical value; strings with numerical values pass.
array()
abs()
error_reporting (E_ALL & -E_NOTICE)
is_numeric()
28. To check if a constant is already declared
ceil()
mysql
defined()
ASP
29. bitwise left shift
ASP
addslashes()
double quotes
<<
30. collection of binary data
function
&
string
+
31. a line of information that can be stored in a variable or used in a function or statement
string
array_merge()
chop()
$$
32. either hasn't yet been set or is assigned NULL value
XML
AJAX
null
switch
33. Online applications and resources which are available to the general public with very few restrictions
chop()
addslashes()
mysql
open source
34. This will not show error reporting - it will be turned off.
define()
error_reporting (0)
empty()
Shebang
35. The output of var_export((float)array(0));
1
underscores
defined()
addcslashes()
36. any programing language where the script is parsed on the server
+
DTD
$array[] = item
server-side programing
37. To close a connection between a database
$varname[key]
===
ASP
mysql_close($dbc)
38. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
if/elseif/else and switch statements
htmlentities()
count()
trim()
39. To find how many substrings are in a string
htmlentities()
substr_count()
index
foreach loop
40. The order of operations.
>>
open source
string
precedence
41. To get over quotation marks while using arrays
superglobal
wordwrap()
sql
curly braces
42. Used to create a substring (referred to as a token) from a larger string
isset()
PHP
array
strtok()
43. a database which is best supported by PHP
superglobal
mysql
integer
numbers
44. To create an array
array()
Shebang
ceil()
$_SESSION[]
45. This will show all error reporting except for notice errors.
Parse error
null
error_reporting (E_ALL & -E_NOTICE)
mysql_fetch_object()
46. To refer to an item in an array
$$
.=
float
$varname[key]
47. To declare a constant
define()
Magic Constant
client-side programing
SGML
48. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
list()
precedence
empty()
49. Returns a string with backslashes in front of the specified characters
addcslashes()
single quotes
ini_set ('display_errors', 1)
integer
50. To sort by the keys while maintaining the correlation between the key and its value
ksort()
array
null
.=