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. When used the value can be passed safely through the URL (GET).
boolean
mysql_fetch_array()
$$
urlencode()
2. a line of information that can be stored in a variable or used in a function or statement
preg_replace()
Object
loops
string
3. Use ________ to have multiple quotations in one string
+
<<
control structure
the escape character ''
4. bitwise AND
&
substr_count()
$$
Notice
5. bitwise left shift
date()
number_format()
<<
true
6. Used to convert certain HTML tags into their entity versions.
round() Function
htmlspecialchars()
for ($i = 0; $i < count($array); $i++) {statement(s);}
parentheses
7. Uses two arguments: constant name and constant definition
reassign
define()
0
associative array
8. Converts a string of ASCII characters to hexadecimal values
==
$$
decimal
bin2hex()
9. To word wrap after a certain amount of characters.
addcslashes()
underscores
wordwrap()
0
10. To reorganise the array randomly
is_numeric()
shuffle()
isset()
count()
11. A data structure that can hold a number of items of data of the same type eg. a list of names
array
unset()
^
$_SESSION[]
12. Online applications and resources which are available to the general public with very few restrictions
predefined
open source
preg_match()
rsort()
13. ____ or key is referred to for a value within an array.
unset()
error_reporting (0)
open source
index
14. 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
15. Used to find the length of a string
strlen()
GET
curly braces
array
16. container of both data and code
precedence
Object
HTTP
strlen()
17. Control structures that break exit
crypt()
nl2br()
Magic Constant
if/elseif/else and switch statements
18. To counter htmlentities()
if/elseif/else and switch statements
date()
Magic Constant
html_entity_decode()
19. To sort the values while maintaining the correlation between each value and its key
asort()
Notice
loops
$array[] = item
20. To find how many substrings are in a string
floor()
mysql_close($dbc)
substr_count()
rsort()
21. This will not show error reporting - it will be turned off.
int
error_reporting (0)
$_GET[]
superglobal
22. To check if a constant is already declared
Array
Parse error
defined()
mysql_fetch_object()
23. Function used to find the absolute value of a number or numeric variable
mysql
abs()
error_reporting (E_ALL | E_STRICT)
&
24. TRUE or FALSE
ini_set ('display_errors', 1)
if/elseif/else and switch statements
boolean
octal
25. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
count()
foreach
indexed array
26. To delete a variable or an element of an array
$_GET[]
negative numbers
WYSIWYG
unset()
27. Used to convert all HTML tags into their entity versions.
$var++ and $var
underscores
Parse error
htmlentities()
28. The output of var_export((float)array());
<<
substr_count()
XOR
0
29. Shorthand used to increment and decrement
WYSIWYG
decimal
$var++ and $var
round() Function
30. To sort values of an array in reversed order
+
+= or -= or *= or /=
rsort()
==
31. any programing language where the script is parsed on the server
$_SESSION[]
server-side programing
predefined variable
if/elseif/else and switch statements
32. Function can you use to format a number with commas
isset()
trim()
number_format()
function
33. Used to create a substring (referred to as a token) from a larger string
strtok()
numbers
asort()
control structure
34. Search Engine Optimization
SEO
$varname[key]
the escape character ''
general
35. An array of variables passed with <input /> data
$_POST[]
Constant
ksort()
curly braces
36. The four main error types are:Notice - Warning - ________ and Error.
Parse error
+= or -= or *= or /=
htmlspecialchars()
rand()
37. signed integer
POST
switch
<?php
int
38. $_POST and $_GET are ________ variables.
predefined
XML
function error_reporting()
===
39. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
XML
GET
single quotes
round() Function
40. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
$_SESSION[]
drop
empty()
<?php
41. Use ______ when a variable contains any amount of variables; in general.
double quotes
curly braces
unset()
echo
42. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
array()
XOR
null
superglobal
43. Creates a pointer to a file with the declared mode (read - write -etc.).
Parse error
fopen()
rsort()
foreach
44. To sort values of an array without regard to the keys
rand()
mysql_fetch_array()
empty()
sort()
45. Hyper Text Transfer Protocol
curly braces
HTTP
drop
precedence
46. The three types of loops in PHP are: for - while - ____.
Array
Parse error
variable
foreach
47. A conditional or loop is a ________________.
<?php
addslashes()
arsort()
control structure
48. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
define()
?>
indexed array
49. a storage location in the computer's memory that has a type & a name and a contents
octal
sort()
variable
curly braces; ${$total}
50. The output of var_export((float)array(0));
empty()
0
1
$_REQUEST