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. says 'if' this then do this 'else' do this or 'while' this do this
statement
rand()
crypt()
if/elseif/else and switch statements
2. This error refers to a variable with no value.
isset()
Notice
XML
null
3. leading zero: 0100 or 0567
octal
wordwrap()
null
XOR
4. The array that stores variables specific to a user's visit
$_REQUEST
$_SESSION[]
superglobal
numbers
5. Operators used to operate and assign
bin2hex()
+= or -= or *= or /=
htmlspecialchars()
string
6. Tag to end a php script
?>
Parse error
null
parentheses
7. Function used to round down to the lowest integer
function error_reporting()
floor()
float
rsort()
8. Hyper Text Transfer Protocol
number_format()
WYSIWYG
predefined
HTTP
9. Returns a character from a specified ASCII value
htmlentities()
array()
WYSIWYG
chr()
10. container of ordered data elements
htmlspecialchars()
ceil()
Array
preg_split()
11. A conditional or loop is a ________________.
double quotes
date()
control structure
integer
12. Online applications and resources which are available to the general public with very few restrictions
function
mysql_fetch_array()
predefined
open source
13. Variable names cannot begin with _______
+
predefined
numbers
curly braces
14. To close a connection between a database
mysql_close($dbc)
round() Function
number_format()
Object
15. An array of variables passed with <input /> data
Magic Constant
Hex
$_POST[]
+= or -= or *= or /=
16. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
error_reporting (0)
$array[] = item
drop
17. function Function used to create a random number
DTD
rand()
parentheses
error_reporting (E_ALL & -E_NOTICE)
18. a type with two possible values: true and false
==
str_ireplace()
boolean
associative array
19. 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
20. Used to convert all HTML tags into their entity versions.
Notice
chop()
drop
htmlentities()
21. Used to find the length of a string
isset()
strlen()
$_POST[]
decimal
22. Control structures that break exit
control structure
if/elseif/else and switch statements
getrandmax()
ini_set ('display_errors', 1)
23. An array whose keys are strings; also known as a hash.
str_ireplace()
Parse error
associative array
ceil()
24. addition
+
$varname[key]
mysql_close($dbc)
variable
25. Standard Generalized Markup Language
asort()
Parse error
SGML
==
26. Function can you use to format a number with commas
unset()
substr_count()
number_format()
Shebang
27. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
echo
Parse error
date()
28. Used to encrypt values - it is a one-way encryption method
str_ireplace()
switch
crypt()
HTML
29. To determine the amount of elements in an array
error_reporting (E_ALL)
strlen()
count()
$dbc = mysql_connect(hostname, username, password)
30. To get time data
Object
ASP
date()
HTML
31. The ouput of var_export((bool)"NULL");
empty()
sql
true
associative array
32. Leading 0x: 0x13F or 0xA23
statement
Hex
addslashes()
array()
33. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
.=
error_reporting (E_ALL & -E_NOTICE)
superglobal
HTML
34. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
Parse error
<?php
double quotes
35. To sort the values while maintaining the correlation between each value and its key
error_reporting (0)
the escape character ''
asort()
error_reporting (E_ALL | E_STRICT)
36. Hypertext Preprocessor - a server-side programing language used to create webpages
PHP
precedence
HTTP
include() and require()
37. To assign keys to the values in an array
POST
mysql_close($dbc)
array()
list()
38. To check if a constant is already declared
DTD
?>
defined()
htmlspecialchars()
39. The three types of loops in PHP are: for - while - ____.
$_POST[]
date()
foreach
control structure
40. signed floating-point value
reassign
&
float
Notice
41. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
XOR
general
decimal
42. TRUE or FALSE
boolean
Shebang
if/elseif/else and switch statements
Object
43. To create an array
str_word_count()
rsort()
array()
HTTP
44. standard notation
array()
decimal
&
^
45. 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.
$_REQUEST
&
error_reporting (E_ALL | E_STRICT)
Parse error
46. To find how many substrings are in a string
1
substr_count()
mysql_fetch_object()
<<
47. a database which is best supported by PHP
preg_replace()
control structure
mysql
wordwrap()
48. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
empty()
rsort()
foreach
precedence
49. Document Type Definitions
E_STRICT
DTD
urlencode()
===
50. To declare a constant
statement
define()
Warning
ceil()