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. bitwise left shift
Array
drop
<<
&
2. identity
drop
===
the period; .
SEO
3. This fatal error arises from memory allocation problem.
$varname[key]
superglobal
Error
array()
4. To reset an array _______ the array() function to the array
for ($i = 0; $i < count($array); $i++) {statement(s);}
Shebang
?>
reassign
5. 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
6. To word wrap after a certain amount of characters.
PHP
unset()
parentheses
wordwrap()
7. returns the number of matches found by a given search string under this format...
rand()
Warning
echo
preg_match()
8. Shorthand used to increment and decrement
indexed array
XOR
$var++ and $var
WYSIWYG
9. To sort by the keys while maintaining the correlation between the key and its value
Magic Constant
ksort()
for ($i = 0; $i < count($array); $i++) {statement(s);}
abs()
10. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
ceil()
abs()
define()
11. Control structures that break exit
if/elseif/else and switch statements
double quotes
negative numbers
abs()
12. Function used to round down to the lowest integer
!= inequality
floor()
statement
list()
13. The prefix for a dynamic variable - also known as a variable variable
XOR
boolean
variable
$$
14. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
rand()
true
error_reporting (0)
15. print $_SERVER will _____ work if you use the print function on arrays.
date()
not
HTTP
1
16. To sort the values while maintaining the correlation between each value and its key - in reversed order
control structure
Parse error
arsort()
error_reporting (E_ALL)
17. used to round numeric values.
isset()
Parse error
str_word_count()
round() Function
18. ____ or key is referred to for a value within an array.
index
SGML
error_reporting (E_ALL & -E_NOTICE)
variable
19. Used to find the amount of words in a string.
statement
WYSIWYG
$_REQUEST
str_word_count()
20. Function can you use to format a number with commas
curly braces
number_format()
true
rsort()
21. $_POST and $_GET are ________ variables.
wordwrap()
error_reporting (0)
predefined
chr()
22. a positive or negative number
foreach loop
integer
ini_set ('display_errors', 1)
SGML
23. To set up error reporting
ksort()
function error_reporting()
switch
define()
24. The name of the #! used to designate the location of the PHP binary
Shebang
single quotes
mysql_fetch_array()
defined()
25. the most basic function in PHP used to output information to the page
XOR
the dollar sign $
echo
$$
26. Leading 0x: 0x13F or 0xA23
Hex
Shebang
$varname[key]
$_GET[]
27. Search Engine Optimization
PHP
define()
index
SEO
28. This will show all error reporting except for notice errors.
str_word_count()
error_reporting (E_ALL & -E_NOTICE)
numbers
Warning
29. Active Server Pages
ASP
AJAX
array_merge()
drop
30. Returns a string with backslashes in front of predefined characters
html_entity_decode()
asort()
Error
addslashes()
31. To close a connection between a database
for ($i = 0; $i < count($array); $i++) {statement(s);}
mysql_close($dbc)
precedence
POST
32. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
0
htmlentities()
Magic Constant
ceil()
33. To delete a variable or an element of an array
curly braces
unset()
addcslashes()
Parse error
34. Hyper Text Markup Language
Array
!= inequality
HTML
html_entity_decode()
35. Converts a string of ASCII characters to hexadecimal values
bin2hex()
$_SESSION[]
array_merge()
Parse error
36. The output of var_export((float)array(0));
1
error_reporting (E_ALL & -E_NOTICE)
isset()
$dbc = mysql_connect(hostname, username, password)
37. To find how many substrings are in a string
+
substr_count()
addslashes()
==
38. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
index
Magic Constant
Parse error
true
39. Function that contains the highest value that rand() can have randomly
curly braces
getrandmax()
crypt()
single quotes
40. a language in which to make querys to a database with
sql
foreach loop
asort()
switch
41. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
single quotes
trim()
strip_tags()
count()
42. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
associative array
array
$$
general
43. standard notation
decimal
true
!= inequality
the period; .
44. The order of operations.
precedence
$_POST[]
SGML
>>
45. The array that stores variables specific to a user's visit
>>
$_SESSION[]
statement
double quotes
46. Document Type Definitions
int
predefined
DTD
function error_reporting()
47. _______ is a comparison operator
!= inequality
defined()
0
nl2br()
48. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
mysql_close($dbc)
&
trim()
$_REQUEST
49. either hasn't yet been set or is assigned NULL value
underscores
rand()
null
$var++ and $var
50. Use ______ when a variable contains any amount of variables; in general.
loops
strip_tags()
0
double quotes