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. Use ______ when there are no variables in the string
server-side programing
single quotes
abs()
wordwrap()
2. _________ can be used in conditional statements to set precedence
number_format()
boolean
unset()
parentheses
3. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
Parse error
>>
Notice
empty()
4. ___________ can be used with substr() to count backward
arsort()
negative numbers
underscores
loops
5. Used to check if a variable has any value (including 0 or FALSE or an empty string).
ini_set ('display_errors', 1)
$_SESSION[]
isset()
parentheses
6. bitwise left shift
list()
error_reporting (E_ALL & -E_NOTICE)
<<
asort()
7. To sort values of an array in reversed order
Constant
$array[] = item
statement
rsort()
8. Define(NAME,value)
<?php
decimal
Constant
the dollar sign $
9. When used the value can be passed safely through the URL (GET).
DTD
fopen()
urlencode()
nl2br()
10. Alias of rtrim()
chop()
POST
sql
!= inequality
11. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
Shebang
$_POST[]
mysql_close($dbc)
12. a language in which to make querys to a database with
sql
bin2hex()
control structure
===
13. Used to create a substring (referred to as a token) from a larger string
arsort()
addslashes()
+= or -= or *= or /=
strtok()
14. Variable names can begin with __________
Parse error
rsort()
associative array
underscores
15. Standard Generalized Markup Language
associative array
DTD
SGML
sort()
16. What You See Is What You Get
WYSIWYG
string
open source
$_REQUEST
17. To remove all HTML and PHP tags.
&
strip_tags()
array()
$dbc = mysql_connect(hostname, username, password)
18. An array of variables passed in the URL
the escape character ''
true
rand()
$_GET[]
19. addition
+
null
WYSIWYG
<?php
20. Use ________ to have multiple quotations in one string
the escape character ''
array()
define()
function error_reporting()
21. To assign array element values to individual variables
error_reporting (E_ALL | E_STRICT)
getrandmax()
list()
$array[] = item
22. To counter htmlentities()
arsort()
server-side programing
unset()
html_entity_decode()
23. any programing language where the script is parsed on the server
precedence
server-side programing
XML
$array[] = item
24. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
Warning
>>
$_REQUEST
sql
25. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
empty()
chr()
is_numeric()
negative numbers
26. Document Type Definitions
DTD
count()
mysql_fetch_object()
Shebang
27. bitwise AND
array
define()
>>
&
28. The array that stores variables specific to a user's visit
$varname[key]
$_SESSION[]
htmlspecialchars()
Array
29. Converts a string of ASCII characters to hexadecimal values
error_reporting (E_ALL)
bin2hex()
integer
htmlentities()
30. To declare a constant
define()
E_STRICT
client-side programing
array_merge()
31. $_POST Data sent using POST found is sent to _______
sql
predefined variable
preg_replace()
rsort()
32. Hyper Text Transfer Protocol
HTML
HTTP
parentheses
GET
33. To assign keys to the values in an array
HTTP
for ($i = 0; $i < count($array); $i++) {statement(s);}
array()
substr_count()
34. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
str_word_count()
GET
integer
isset()
35. To iterate over the keys and values of an array
error_reporting (0)
mysql_close($dbc)
defined()
foreach loop
36. standard notation
decimal
array()
rand()
count()
37. An array whose keys are strings; also known as a hash.
the dollar sign $
associative array
client-side programing
parentheses
38. 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.
curly braces
Warning
HTML
error_reporting (E_ALL | E_STRICT)
39. Search Engine Optimization
Shebang
PHP
precedence
SEO
40. leading zero: 0100 or 0567
getrandmax()
DTD
octal
predefined variable
41. PHP has two conditional: if and ______.
arsort()
^
switch
str_word_count()
42. Returns a string with backslashes in front of predefined characters
variable
addslashes()
Parse error
list()
43. a database which is best supported by PHP
for ($i = 0; $i < count($array); $i++) {statement(s);}
open source
preg_replace()
mysql
44. print $_SERVER will _____ work if you use the print function on arrays.
unset()
Shebang
<<
not
45. collection of binary data
double quotes
empty()
string
echo
46. A data structure that can hold a number of items of data of the same type eg. a list of names
switch
array
if/elseif/else and switch statements
<<
47. To delete a variable or an element of an array
==
addcslashes()
unset()
Constant
48. TRUE or FALSE
empty()
for ($i = 0; $i < count($array); $i++) {statement(s);}
boolean
predefined variable
49. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
abs()
Parse error
Array
E_STRICT
50. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
error_reporting (E_ALL)
HTTP
Magic Constant
parentheses