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
?>
foreach loop
round() Function
===
2. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
predefined variable
superglobal
Warning
for ($i = 0; $i < count($array); $i++) {statement(s);}
3. An array of variables passed in the URL
sql
$_GET[]
integer
SEO
4. This will show all error reporting.
$$
the dollar sign $
include() and require()
error_reporting (E_ALL)
5. To sort values of an array without regard to the keys
ini_set ('display_errors', 1)
sort()
?>
trim()
6. says 'if' this then do this 'else' do this or 'while' this do this
!= inequality
XOR
list()
statement
7. Uses two arguments: constant name and constant definition
the dollar sign $
mysql_close($dbc)
define()
str_ireplace()
8. $_POST Data sent using POST found is sent to _______
POST
===
Parse error
predefined variable
9. container of ordered data elements
Array
boolean
arsort()
function
10. signed floating-point value
E_STRICT
float
error_reporting (E_ALL)
define()
11. Hyper Text Markup Language
HTML
number_format()
round() Function
preg_replace()
12. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
+= or -= or *= or /=
$_REQUEST
preg_split()
mysql_close($dbc)
13. Use ______ when a variable contains any amount of variables; in general.
for ($i = 0; $i < count($array); $i++) {statement(s);}
count()
Warning
double quotes
14. Operators used to operate and assign
+= or -= or *= or /=
int
urlencode()
round() Function
15. Used to display errors in a particular script - should be placed at top of script.
16. allows you to split strings based on more complex rules
numbers
preg_split()
open source
superglobal
17. The ouput of var_export((bool)"NULL");
+
preg_split()
true
$varname[key]
18. Shorthand used to increment and decrement
$$
error_reporting (0)
$var++ and $var
XML
19. To counter htmlentities()
floor()
predefined
html_entity_decode()
PHP
20. PHP has two conditional: if and ______.
indexed array
+
client-side programing
switch
21. a language in which to make querys to a database with
Magic Constant
$$
WYSIWYG
sql
22. To refer to an item in an array
$varname[key]
error_reporting (E_ALL)
error_reporting (0)
server-side programing
23. Variable names can begin with __________
<?php
array
superglobal
underscores
24. the most basic function in PHP used to output information to the page
echo
0
XML
function error_reporting()
25. ___________ can be used with substr() to count backward
for ($i = 0; $i < count($array); $i++) {statement(s);}
integer
negative numbers
+= or -= or *= or /=
26. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
$array[] = item
sql
nl2br()
chop()
27. a database which is best supported by PHP
mysql
bin2hex()
Hex
associative array
28. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
$_SESSION[]
double quotes
GET
string
29. Returns a string with backslashes in front of predefined characters
Hex
string
server-side programing
addslashes()
30. To declare a constant
define()
htmlentities()
defined()
getrandmax()
31. The prefix for a dynamic variable - also known as a variable variable
$$
+= or -= or *= or /=
include() and require()
shuffle()
32. function Function used to create a random number
rand()
Hex
preg_match()
GET
33. Function that contains the highest value that rand() can have randomly
ksort()
Parse error
getrandmax()
Notice
34. A conditional or loop is a ________________.
reassign
sql
$_REQUEST
control structure
35. Converts a string of ASCII characters to hexadecimal values
ini_set ('display_errors', 1)
Hex
bin2hex()
1
36. The syntax for connecting to a database
wordwrap()
>>
$dbc = mysql_connect(hostname, username, password)
float
37. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
predefined
isset()
?>
38. ____ or key is referred to for a value within an array.
index
mysql_fetch_array()
$varname[key]
predefined variable
39. Use ________ to have multiple quotations in one string
$_GET[]
the escape character ''
client-side programing
define()
40. The three types of loops in PHP are: for - while - ____.
sql
foreach
decimal
null
41. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
abs()
precedence
curly braces
42. standard notation
defined()
Notice
decimal
<<
43. When used the value can be passed safely through the URL (GET).
urlencode()
strlen()
general
count()
44. Leading 0x: 0x13F or 0xA23
unset()
Hex
isset()
ksort()
45. returns the number of matches found by a given search string under this format...
E_STRICT
error_reporting (E_ALL & -E_NOTICE)
strlen()
preg_match()
46. To word wrap after a certain amount of characters.
curly braces; ${$total}
wordwrap()
GET
rand()
47. container of both data and code
server-side programing
variable
Object
unset()
48. Use ______ when there are no variables in the string
Shebang
single quotes
str_word_count()
defined()
49. print $_SERVER will _____ work if you use the print function on arrays.
not
negative numbers
ceil()
the dollar sign $
50. EXtensible Markup Language
htmlspecialchars()
<?php
XML
define()