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. $_SERVER is a ________ variable.
arsort()
boolean
$array[] = item
predefined
2. Control structure that continue exit - they perform specific statements for a determined number of iterations.
error_reporting (E_ALL | E_STRICT)
loops
foreach loop
abs()
3. container of ordered data elements
index
0
Array
null
4. leading zero: 0100 or 0567
shuffle()
1
ksort()
octal
5. signed integer
int
$varname[key]
$array[] = item
$$
6. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
array
empty()
ceil()
SEO
7. What You See Is What You Get
DTD
chr()
reassign
WYSIWYG
8. A conditional or loop is a ________________.
XML
control structure
int
$array[] = item
9. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
function
addcslashes()
$array[] = item
rand()
10. collection of binary data
string
rand()
Hex
chr()
11. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
function error_reporting()
nl2br()
string
12. An array whose keys are numbers.
WYSIWYG
indexed array
count()
parentheses
13. Creates a pointer to a file with the declared mode (read - write -etc.).
string
the dollar sign $
fopen()
.=
14. _______ is a comparison operator
$_SESSION[]
Hex
!= inequality
preg_match()
15. TRUE or FALSE
GET
boolean
asort()
null
16. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
HTML
AJAX
$_POST[]
17. The name of the #! used to designate the location of the PHP binary
preg_split()
Shebang
Constant
predefined variable
18. To refer to an item in an array
shuffle()
$varname[key]
reassign
superglobal
19. The ouput of var_export((bool)"NULL");
.=
SGML
precedence
true
20. 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
21. To sort by the keys while maintaining the correlation between the key and its value
ksort()
boolean
mysql_fetch_array()
$_REQUEST
22. ___________ can be used with substr() to count backward
control structure
negative numbers
sort()
open source
23. the most basic function in PHP used to output information to the page
Magic Constant
include() and require()
echo
E_STRICT
24. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
echo
asort()
not
25. To iterate over the keys and values of an array
client-side programing
open source
foreach loop
.=
26. Used to find the length of a string
Magic Constant
==
rsort()
strlen()
27. Function used to round up to the highest integer
ceil()
1
echo
&
28. A data structure that can hold a number of items of data of the same type eg. a list of names
trim()
foreach loop
error_reporting (E_ALL | E_STRICT)
array
29. Control structures that break exit
if/elseif/else and switch statements
Shebang
$var++ and $var
preg_match()
30. 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.
define()
error_reporting (E_ALL | E_STRICT)
PHP
array()
31. Shorthand used to increment and decrement
asort()
E_STRICT
$var++ and $var
not
32. $_POST and $_GET are ________ variables.
>>
reassign
string
predefined
33. The syntax for connecting to a database
1
wordwrap()
is_numeric()
$dbc = mysql_connect(hostname, username, password)
34. returns the number of matches found by a given search string under this format...
preg_match()
WYSIWYG
htmlspecialchars()
>>
35. To reorganise the array randomly
Magic Constant
abs()
drop
shuffle()
36. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
int
Parse error
sort()
empty()
37. container of both data and code
Object
associative array
htmlentities()
POST
38. To check if a constant is already declared
predefined
variable
number_format()
defined()
39. This fatal error arises from memory allocation problem.
switch
not
numbers
Error
40. To find how many substrings are in a string
chop()
substr_count()
octal
crypt()
41. print $_SERVER will _____ work if you use the print function on arrays.
preg_match()
nl2br()
$array[] = item
not
42. Variable names cannot begin with _______
sort()
numbers
defined()
precedence
43. To word wrap after a certain amount of characters.
^
error_reporting (0)
floor()
wordwrap()
44. This will not show error reporting - it will be turned off.
<?php
error_reporting (0)
isset()
substr_count()
45. Use ______ when a variable contains any amount of variables; in general.
double quotes
addslashes()
string
str_word_count()
46. Used to check if a variable has a valid numerical value; strings with numerical values pass.
unset()
array_merge()
!= inequality
is_numeric()
47. Active Server Pages
error_reporting (0)
$_REQUEST
boolean
ASP
48. To declare a constant
define()
loops
Hex
int
49. either hasn't yet been set or is assigned NULL value
switch
for ($i = 0; $i < count($array); $i++) {statement(s);}
GET
null
50. identity
===
SEO
arsort()
<<