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 keys and values of an array
ceil()
foreach loop
$dbc = mysql_connect(hostname, username, password)
===
2. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
unset()
$varname[key]
Parse error
floor()
3. Variable names cannot begin with _______
XOR
int
numbers
boolean
4. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
count()
rsort()
$array[] = item
function error_reporting()
5. The output of var_export((float)array());
0
===
$_REQUEST
rsort()
6. bitwise AND
str_word_count()
&
ceil()
$varname[key]
7. the most basic function in PHP used to output information to the page
echo
fopen()
addcslashes()
indexed array
8. print $_SERVER will _____ work if you use the print function on arrays.
not
integer
<?php
HTTP
9. Function that contains the highest value that rand() can have randomly
substr_count()
getrandmax()
mysql_fetch_array()
string
10. When used the value can be passed safely through the URL (GET).
substr_count()
include() and require()
urlencode()
$_POST[]
11. To word wrap after a certain amount of characters.
wordwrap()
error_reporting (E_ALL | E_STRICT)
urlencode()
indexed array
12. This will show all error reporting.
error_reporting (E_ALL)
Warning
error_reporting (E_ALL & -E_NOTICE)
switch
13. Function used to round down to the lowest integer
htmlspecialchars()
asort()
for ($i = 0; $i < count($array); $i++) {statement(s);}
floor()
14. Asynchronous Javascript And XML
function
AJAX
integer
error_reporting (E_ALL & -E_NOTICE)
15. To include files - _______ will give errors and _________ will terminate execution().
$var++ and $var
preg_replace()
include() and require()
decimal
16. leading zero: 0100 or 0567
variable
octal
foreach loop
addslashes()
17. Shorthand used to increment and decrement
HTML
Magic Constant
$_POST[]
$var++ and $var
18. a database which is best supported by PHP
integer
mysql
rsort()
foreach loop
19. To counter htmlentities()
control structure
list()
html_entity_decode()
boolean
20. Variable names can begin with __________
error_reporting (E_ALL | E_STRICT)
underscores
echo
Constant
21. _____ is a logical operator
urlencode()
nl2br()
XOR
array()
22. identity
sql
PHP
addslashes()
===
23. Operators used to operate and assign
?>
$_SESSION[]
+= or -= or *= or /=
rsort()
24. searches the subject for matches to a given pattern replaced with the given replacement text
preg_split()
control structure
abs()
preg_replace()
25. The four main error types are:Notice - Warning - ________ and Error.
unset()
Parse error
getrandmax()
error_reporting (E_ALL & -E_NOTICE)
26. Used to encrypt values - it is a one-way encryption method
E_STRICT
crypt()
getrandmax()
wordwrap()
27. used to round numeric values.
floor()
octal
round() Function
strtok()
28. Active Server Pages
ASP
predefined
$array[] = item
not
29. bitwise right shift
precedence
parentheses
$_REQUEST
>>
30. TRUE or FALSE
foreach
$$
XOR
boolean
31. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
DTD
$array[] = item
variable
32. PHP has two conditional: if and ______.
$array[] = item
switch
parentheses
predefined
33. To sort the values while maintaining the correlation between each value and its key - in reversed order
AJAX
arsort()
strtok()
Notice
34. standard notation
indexed array
decimal
PHP
mysql_fetch_object()
35. To find how many substrings are in a string
substr_count()
arsort()
sql
&
36. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
server-side programing
+
superglobal
rsort()
37. To sort values of an array without regard to the keys
E_STRICT
.=
sort()
foreach
38. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
client-side programing
PHP
SGML
39. function Function used to create a random number
$_POST[]
addcslashes()
ceil()
rand()
40. Alias of rtrim()
!= inequality
foreach
chop()
abs()
41. To assign array element values to individual variables
octal
switch
preg_match()
list()
42. To set up error reporting
getrandmax()
htmlspecialchars()
the dollar sign $
function error_reporting()
43. The concatenation assignment operator?
.=
defined()
round() Function
$var++ and $var
44. equivalence
error_reporting (0)
==
boolean
substr_count()
45. The prefix for a dynamic variable - also known as a variable variable
bin2hex()
$$
error_reporting (E_ALL)
is_numeric()
46. Use ______ when a variable contains any amount of variables; in general.
double quotes
DTD
!= inequality
substr_count()
47. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
round() Function
&
date()
48. Returns a string with backslashes in front of predefined characters
Parse error
wordwrap()
addslashes()
addcslashes()
49. signed floating-point value
==
float
ceil()
Notice
50. Function can you use to format a number with commas
str_ireplace()
POST
number_format()
abs()