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. $_POST and $_GET are ________ variables.
AJAX
predefined
string
string
2. Used to convert certain HTML tags into their entity versions.
for ($i = 0; $i < count($array); $i++) {statement(s);}
GET
number_format()
htmlspecialchars()
3. The output of var_export((float)array());
<?php
true
0
round() Function
4. An array of variables passed with <input /> data
SGML
$_POST[]
for ($i = 0; $i < count($array); $i++) {statement(s);}
loops
5. equivalence
==
associative array
getrandmax()
boolean
6. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
null
$varname[key]
^
7. Used to check if a variable has any value (including 0 or FALSE or an empty string).
error_reporting (0)
WYSIWYG
single quotes
isset()
8. This error arises from misusing a function.
urlencode()
Warning
<<
foreach loop
9. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
getrandmax()
Error
$_SESSION[]
drop
10. To check if a constant is already declared
define()
indexed array
loops
defined()
11. Use ______ when a variable contains any amount of variables; in general.
<<
rand()
predefined
double quotes
12. An array whose keys are strings; also known as a hash.
SEO
number_format()
associative array
date()
13. a positive or negative number
ksort()
loops
isset()
integer
14. signed floating-point value
preg_match()
float
SGML
bin2hex()
15. a database which is best supported by PHP
mysql
Hex
htmlspecialchars()
ceil()
16. any programing language where the user must support the language the script is written in
index
client-side programing
drop
$_GET[]
17. Use ________ to have multiple quotations in one string
error_reporting (E_ALL)
the escape character ''
predefined variable
shuffle()
18. To iterate over the keys and values of an array
PHP
foreach loop
drop
statement
19. To sort values of an array in reversed order
rsort()
htmlentities()
PHP
>>
20. any programing language where the script is parsed on the server
$array[] = item
HTML
<<
server-side programing
21. Tag to begin a php script
<?php
defined()
arsort()
shuffle()
22. Converts a string of ASCII characters to hexadecimal values
bin2hex()
addslashes()
^
Shebang
23. To sort the values while maintaining the correlation between each value and its key - in reversed order
POST
arsort()
parentheses
$dbc = mysql_connect(hostname, username, password)
24. The order of operations.
0
round() Function
1
precedence
25. a language in which to make querys to a database with
>>
sql
$_POST[]
GET
26. Hyper Text Transfer Protocol
shuffle()
true
html_entity_decode()
HTTP
27. bitwise right shift
>>
reassign
bin2hex()
list()
28. print $_SERVER will _____ work if you use the print function on arrays.
0
not
strip_tags()
number_format()
29. Used to replace a substring with another string - it is not case-sensitive.
<?php
GET
str_ireplace()
POST
30. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
sql
substr_count()
mysql_fetch_object()
fopen()
31. To set up error reporting
function error_reporting()
array_merge()
variable
underscores
32. PHP has two conditional: if and ______.
$_GET[]
E_STRICT
switch
===
33. To merge arrays
mysql_close($dbc)
$_POST[]
sort()
array_merge()
34. Function used to round down to the lowest integer
reassign
$_GET[]
floor()
Array
35. A conditional or loop is a ________________.
if/elseif/else and switch statements
PHP
control structure
addslashes()
36. 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 __________.
ceil()
ksort()
curly braces; ${$total}
curly braces
37. says 'if' this then do this 'else' do this or 'while' this do this
XOR
string
integer
statement
38. Used to check if a variable has a valid numerical value; strings with numerical values pass.
html_entity_decode()
curly braces; ${$total}
is_numeric()
mysql_fetch_array()
39. To sort by the keys while maintaining the correlation between the key and its value
ksort()
string
round() Function
curly braces
40. This error refers to a variable with no value.
$_REQUEST
echo
trim()
Notice
41. 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)
.=
is_numeric()
POST
42. Use ______ when there are no variables in the string
html_entity_decode()
single quotes
sql
is_numeric()
43. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
substr_count()
wordwrap()
addslashes()
44. Variable names can begin with __________
not
$_SESSION[]
underscores
&
45. To remove all HTML and PHP tags.
strlen()
strip_tags()
mysql
preg_replace()
46. _______ is a comparison operator
arsort()
fopen()
preg_replace()
!= inequality
47. 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
48. Used to convert all HTML tags into their entity versions.
html_entity_decode()
E_STRICT
nl2br()
htmlentities()
49. Function can you use to format a number with commas
number_format()
ceil()
rsort()
XML
50. bitwise AND
GET
shuffle()
&
sql