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. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
function error_reporting()
general
$_REQUEST
float
2. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
POST
error_reporting (E_ALL | E_STRICT)
float
3. $_POST and $_GET are ________ variables.
predefined
date()
parentheses
substr_count()
4. Used to check if a variable has any value (including 0 or FALSE or an empty string).
?>
isset()
&
^
5. TRUE or FALSE
for ($i = 0; $i < count($array); $i++) {statement(s);}
sql
single quotes
boolean
6. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_array()
?>
octal
is_numeric()
7. Used to find the amount of words in a string.
isset()
curly braces
str_word_count()
abs()
8. The four main error types are:Notice - Warning - ________ and Error.
HTML
underscores
fopen()
Parse error
9. This will show all error reporting.
0
$_GET[]
error_reporting (E_ALL)
$_SESSION[]
10. To iterate over the keys and values of an array
foreach loop
array()
PHP
array
11. To refer to an item in an array
nl2br()
chr()
$varname[key]
client-side programing
12. This error refers to a variable with no value.
POST
control structure
boolean
Notice
13. Creates a pointer to a file with the declared mode (read - write -etc.).
the dollar sign $
associative array
rsort()
fopen()
14. any programing language where the script is parsed on the server
predefined variable
server-side programing
crypt()
predefined
15. Document Type Definitions
function error_reporting()
DTD
?>
POST
16. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
number_format()
str_ireplace()
urlencode()
17. To declare a constant
function error_reporting()
is_numeric()
define()
general
18. To create an array
true
Error
array()
define()
19. EXtensible Markup Language
XML
loops
statement
$$
20. To counter htmlentities()
rand()
bin2hex()
html_entity_decode()
trim()
21. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
addslashes()
foreach loop
urlencode()
22. The name of the #! used to designate the location of the PHP binary
chr()
htmlspecialchars()
ASP
Shebang
23. The order of operations.
predefined
rsort()
curly braces
precedence
24. identity
===
HTTP
getrandmax()
Parse error
25. Shorthand used to increment and decrement
date()
$var++ and $var
shuffle()
==
26. Standard Generalized Markup Language
SGML
sort()
include() and require()
getrandmax()
27. To check if a constant is already declared
function error_reporting()
is_numeric()
defined()
the escape character ''
28. Used to check if a variable has a valid numerical value; strings with numerical values pass.
===
boolean
trim()
is_numeric()
29. Function used to round up to the highest integer
ceil()
HTML
fopen()
WYSIWYG
30. container of both data and code
1
boolean
strlen()
Object
31. Search Engine Optimization
predefined variable
general
include() and require()
SEO
32. _______ is a comparison operator
Error
!= inequality
boolean
list()
33. 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.
count()
error_reporting (E_ALL | E_STRICT)
arsort()
precedence
34. any programing language where the user must support the language the script is written in
underscores
integer
client-side programing
numbers
35. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
function error_reporting()
PHP
array()
36. Tag to begin a php script
unset()
array
precedence
<?php
37. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
urlencode()
for ($i = 0; $i < count($array); $i++) {statement(s);}
0
nl2br()
38. Use ______ when there are no variables in the string
isset()
double quotes
single quotes
+= or -= or *= or /=
39. Used to find the length of a string
addcslashes()
strlen()
round() Function
ASP
40. Variable names can begin with __________
underscores
str_word_count()
curly braces
ASP
41. _________ can be used in conditional statements to set precedence
?>
boolean
define()
parentheses
42. To reorganise the array randomly
predefined variable
getrandmax()
float
shuffle()
43. Active Server Pages
ASP
<<
count()
chr()
44. Function that contains the highest value that rand() can have randomly
POST
$array[] = item
parentheses
getrandmax()
45. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
$varname[key]
Hex
DTD
Parse error
46. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
empty()
true
define()
str_ireplace()
47. signed floating-point value
addslashes()
GET
arsort()
float
48. This error arises from misusing a function.
Warning
$_SESSION[]
defined()
ksort()
49. Tag to end a php script
precedence
?>
Notice
&
50. bitwise right shift
>>
defined()
function error_reporting()
Error