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. Tag to end a php script
?>
string
<<
1
2. EXtensible Markup Language
$var++ and $var
XML
octal
integer
3. equivalence
associative array
the escape character ''
predefined variable
==
4. Variable names cannot begin with _______
rsort()
boolean
ksort()
numbers
5. To check if a constant is already declared
fopen()
defined()
general
Magic Constant
6. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
not
list()
POST
error_reporting (0)
7. Use ________ to have multiple quotations in one string
float
GET
the escape character ''
SGML
8. To reorganise the array randomly
define()
shuffle()
preg_replace()
error_reporting (E_ALL | E_STRICT)
9. Use ______ when there are no variables in the string
Hex
strip_tags()
for ($i = 0; $i < count($array); $i++) {statement(s);}
single quotes
10. signed floating-point value
crypt()
date()
float
superglobal
11. a positive or negative number
integer
error_reporting (E_ALL | E_STRICT)
htmlspecialchars()
rsort()
12. To declare a constant
define()
numbers
HTML
Constant
13. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
===
statement
E_STRICT
14. Hyper Text Transfer Protocol
HTTP
Magic Constant
rand()
wordwrap()
15. Alias of rtrim()
htmlentities()
chop()
null
decimal
16. Search Engine Optimization
predefined variable
XML
===
SEO
17. Operators used to operate and assign
unset()
urlencode()
+= or -= or *= or /=
$$
18. Returns a character from a specified ASCII value
chr()
rand()
associative array
$var++ and $var
19. Used to encrypt values - it is a one-way encryption method
double quotes
parentheses
crypt()
HTTP
20. This error arises from misusing a function.
!= inequality
Warning
define()
count()
21. To put a dollar sign before a variable like $10 where 10 is the variable's value - you can escape the first dollar sign; $$cost; or you can use __________.
date()
round() Function
curly braces; ${$total}
double quotes
22. Converts a string of ASCII characters to hexadecimal values
bin2hex()
null
curly braces; ${$total}
function error_reporting()
23. An array whose keys are numbers.
indexed array
ini_set ('display_errors', 1)
shuffle()
bin2hex()
24. To include files - _______ will give errors and _________ will terminate execution().
$var++ and $var
Hex
trim()
include() and require()
25. a storage location in the computer's memory that has a type & a name and a contents
variable
string
function error_reporting()
urlencode()
26. The output of var_export((float)array(0));
preg_split()
XML
1
substr_count()
27. Used to convert all HTML tags into their entity versions.
getrandmax()
Parse error
empty()
htmlentities()
28. Returns a string with backslashes in front of predefined characters
not
preg_replace()
WYSIWYG
addslashes()
29. Used to find the amount of words in a string.
predefined variable
str_word_count()
error_reporting (0)
<<
30. The four main error types are:Notice - Warning - ________ and Error.
Parse error
PHP
switch
trim()
31. returns the number of matches found by a given search string under this format...
POST
DTD
string
preg_match()
32. When used the value can be passed safely through the URL (GET).
isset()
urlencode()
mysql_fetch_object()
statement
33. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
drop
rsort()
Parse error
XML
34. a type with two possible values: true and false
number_format()
boolean
preg_replace()
mysql_fetch_array()
35. Tag to begin a php script
<?php
curly braces
is_numeric()
negative numbers
36. signed integer
predefined
int
client-side programing
abs()
37. This will not show error reporting - it will be turned off.
error_reporting (0)
index
mysql_fetch_object()
underscores
38. Variable names can begin with __________
strtok()
Error
underscores
mysql
39. Creates a pointer to a file with the declared mode (read - write -etc.).
Object
fopen()
the dollar sign $
strtok()
40. To iterate over the keys and values of an array
client-side programing
+
foreach loop
number_format()
41. Leading 0x: 0x13F or 0xA23
superglobal
Hex
mysql_fetch_array()
addcslashes()
42. addition
superglobal
preg_split()
+
client-side programing
43. The prefix for a dynamic variable - also known as a variable variable
ini_set ('display_errors', 1)
the escape character ''
$$
integer
44. a database which is best supported by PHP
mysql
array_merge()
date()
strlen()
45. bitwise left shift
Error
PHP
<<
client-side programing
46. The ouput of var_export((bool)"NULL");
$_SESSION[]
>>
true
string
47. The three types of loops in PHP are: for - while - ____.
foreach
GET
htmlentities()
predefined
48. To sort values of an array without regard to the keys
sort()
for ($i = 0; $i < count($array); $i++) {statement(s);}
str_ireplace()
array_merge()
49. 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
50. Hypertext Preprocessor - a server-side programing language used to create webpages
ksort()
strip_tags()
PHP
client-side programing