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
ini_set ('display_errors', 1)
open source
for ($i = 0; $i < count($array); $i++) {statement(s);}
Object
2. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
include() and require()
array
true
POST
3. This error refers to a variable with no value.
error_reporting (E_ALL)
Notice
asort()
mysql
4. TRUE or FALSE
boolean
Notice
E_STRICT
mysql
5. a storage location in the computer's memory that has a type & a name and a contents
trim()
array()
variable
$varname[key]
6. Define(NAME,value)
Constant
+
predefined
E_STRICT
7. $_POST and $_GET are ________ variables.
preg_split()
predefined
preg_replace()
negative numbers
8. Used to replace a substring with another string - it is not case-sensitive.
chr()
str_ireplace()
htmlentities()
DTD
9. bitwise right shift
>>
sql
define()
parentheses
10. print $_SERVER will _____ work if you use the print function on arrays.
wordwrap()
integer
not
associative array
11. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
predefined variable
error_reporting (E_ALL | E_STRICT)
the dollar sign $
12. Function used to round down to the lowest integer
floor()
negative numbers
XOR
$_SESSION[]
13. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
$_POST[]
<?php
variable
14. Function used to find the absolute value of a number or numeric variable
abs()
associative array
not
list()
15. This error arises from misusing a function.
Warning
parentheses
POST
===
16. Variable names cannot begin with _______
E_STRICT
numbers
server-side programing
urlencode()
17. Tag to end a php script
the period; .
not
1
?>
18. any programing language where the script is parsed on the server
precedence
server-side programing
true
htmlspecialchars()
19. bitwise AND
addslashes()
number_format()
&
control structure
20. Search Engine Optimization
===
predefined
SEO
boolean
21. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
0
&
number_format()
Magic Constant
22. Function can you use to format a number with commas
number_format()
chop()
str_ireplace()
POST
23. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
XML
predefined
SEO
24. returns the number of matches found by a given search string under this format...
AJAX
preg_match()
preg_replace()
integer
25. ____ or key is referred to for a value within an array.
error_reporting (E_ALL | E_STRICT)
XML
negative numbers
index
26. bitwise XOR
mysql
+
^
mysql_fetch_object()
27. An array of variables passed with <input /> data
$_POST[]
===
predefined
Constant
28. addition
+
mysql
mysql_fetch_object()
addcslashes()
29. Function that contains the highest value that rand() can have randomly
getrandmax()
fopen()
trim()
single quotes
30. Used to create a substring (referred to as a token) from a larger string
floor()
strtok()
$dbc = mysql_connect(hostname, username, password)
loops
31. To determine the amount of elements in an array
control structure
count()
Array
str_word_count()
32. To close a connection between a database
mysql_close($dbc)
associative array
predefined
empty()
33. To sort by the keys while maintaining the correlation between the key and its value
$_REQUEST
ksort()
strlen()
mysql_fetch_array()
34. This will show all error reporting except for notice errors.
<?php
wordwrap()
string
error_reporting (E_ALL & -E_NOTICE)
35. Use ______ when a variable contains any amount of variables; in general.
numbers
Array
ASP
double quotes
36. the most basic function in PHP used to output information to the page
array()
boolean
defined()
echo
37. Alias of rtrim()
chop()
define()
ceil()
>>
38. function Function used to create a random number
GET
preg_replace()
rand()
round() Function
39. This fatal error arises from memory allocation problem.
substr_count()
preg_split()
addcslashes()
Error
40. The concatenation assignment operator?
SGML
nl2br()
.=
not
41. Control structure that continue exit - they perform specific statements for a determined number of iterations.
mysql
Parse error
define()
loops
42. Control structures that break exit
the period; .
loops
boolean
if/elseif/else and switch statements
43. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
$array[] = item
str_word_count()
the escape character ''
mysql_fetch_object()
44. The order of operations.
precedence
include() and require()
$_SESSION[]
E_STRICT
45. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
indexed array
str_word_count()
arsort()
GET
46. To get time data
strtok()
decimal
foreach
date()
47. Returns a character from a specified ASCII value
chr()
preg_match()
wordwrap()
predefined
48. To remove all HTML and PHP tags.
date()
for ($i = 0; $i < count($array); $i++) {statement(s);}
$_SESSION[]
strip_tags()
49. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
indexed array
chr()
HTTP
50. bitwise left shift
<<
$varname[key]
loops
$_POST[]