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 - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
list()
urlencode()
double quotes
superglobal
2. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$array[] = item
$_REQUEST
control structure
int
3. To include files - _______ will give errors and _________ will terminate execution().
?>
mysql_fetch_object()
include() and require()
$dbc = mysql_connect(hostname, username, password)
4. This error arises from misusing a function.
1
===
Warning
chr()
5. Variable names cannot begin with _______
echo
numbers
round() Function
shuffle()
6. To sort by the keys while maintaining the correlation between the key and its value
include() and require()
mysql
ksort()
$varname[key]
7. _____ is a logical operator
wordwrap()
PHP
XOR
nl2br()
8. To remove all HTML and PHP tags.
unset()
boolean
variable
strip_tags()
9. Used to find the length of a string
1
strlen()
error_reporting (E_ALL)
float
10. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
fopen()
preg_split()
boolean
11. What You See Is What You Get
addslashes()
the escape character ''
WYSIWYG
AJAX
12. A conditional or loop is a ________________.
bin2hex()
predefined variable
control structure
the escape character ''
13. either hasn't yet been set or is assigned NULL value
defined()
negative numbers
function
null
14. Function can you use to format a number with commas
POST
number_format()
foreach loop
error_reporting (E_ALL | E_STRICT)
15. To find how many substrings are in a string
E_STRICT
parentheses
error_reporting (E_ALL | E_STRICT)
substr_count()
16. any programing language where the script is parsed on the server
$dbc = mysql_connect(hostname, username, password)
server-side programing
control structure
count()
17. The output of var_export((float)array(0));
define()
Parse error
1
not
18. This will show all error reporting.
superglobal
if/elseif/else and switch statements
error_reporting (E_ALL)
1
19. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
superglobal
==
float
GET
20. Function used to round down to the lowest integer
floor()
substr_count()
chop()
general
21. All variables must begin with _________.
variable
preg_split()
the dollar sign $
ASP
22. addition
single quotes
null
$var++ and $var
+
23. To get over quotation marks while using arrays
decimal
curly braces
index
E_STRICT
24. To sort the values while maintaining the correlation between each value and its key - in reversed order
^
Warning
arsort()
+
25. To create an array
indexed array
+
Object
array()
26. equivalence
$_GET[]
==
curly braces; ${$total}
foreach
27. container of ordered data elements
string
Array
bin2hex()
Error
28. Returns a character from a specified ASCII value
chr()
wordwrap()
htmlentities()
defined()
29. Returns a string with backslashes in front of the specified characters
HTTP
addcslashes()
strlen()
indexed array
30. To refer to an item in an array
==
$varname[key]
preg_match()
!= inequality
31. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
htmlentities()
POST
integer
chop()
32. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
<<
?>
curly braces
33. bitwise left shift
<<
ceil()
define()
is_numeric()
34. To set up error reporting
function error_reporting()
echo
integer
define()
35. To assign keys to the values in an array
array()
nl2br()
Shebang
addslashes()
36. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
rand()
POST
Object
trim()
37. function Function used to create a random number
integer
addcslashes()
rand()
reassign
38. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
==
mysql_fetch_array()
parentheses
for ($i = 0; $i < count($array); $i++) {statement(s);}
39. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
preg_split()
empty()
the period; .
loops
40. To sort the values while maintaining the correlation between each value and its key
int
array_merge()
predefined
asort()
41. To close a connection between a database
shuffle()
$$
number_format()
mysql_close($dbc)
42. To reset an array _______ the array() function to the array
reassign
error_reporting (E_ALL | E_STRICT)
Warning
octal
43. a type with two possible values: true and false
Shebang
if/elseif/else and switch statements
boolean
function error_reporting()
44. a line of information that can be stored in a variable or used in a function or statement
nl2br()
string
double quotes
foreach loop
45. leading zero: 0100 or 0567
AJAX
octal
predefined
loops
46. Used to encrypt values - it is a one-way encryption method
GET
htmlentities()
octal
crypt()
47. To sort values of an array without regard to the keys
<?php
preg_replace()
sort()
nl2br()
48. Online applications and resources which are available to the general public with very few restrictions
array()
open source
DTD
ini_set ('display_errors', 1)
49. Asynchronous Javascript And XML
AJAX
?>
Object
superglobal
50. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
ksort()
Magic Constant
trim()
E_STRICT