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. signed floating-point value
$varname[key]
float
+
Error
2. To counter htmlentities()
error_reporting (0)
1
html_entity_decode()
if/elseif/else and switch statements
3. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
$_SESSION[]
bin2hex()
superglobal
strip_tags()
4. This will show all error reporting except for notice errors.
$_SESSION[]
function error_reporting()
error_reporting (E_ALL & -E_NOTICE)
sql
5. To find how many substrings are in a string
0
Magic Constant
crypt()
substr_count()
6. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
+
WYSIWYG
variable
7. The three types of loops in PHP are: for - while - ____.
defined()
foreach
round() Function
^
8. bitwise XOR
statement
is_numeric()
^
for ($i = 0; $i < count($array); $i++) {statement(s);}
9. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
PHP
function
if/elseif/else and switch statements
10. Standard Generalized Markup Language
preg_split()
index
==
SGML
11. Tag to end a php script
strtok()
array()
?>
htmlspecialchars()
12. Variable names can begin with __________
underscores
Magic Constant
array
.=
13. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
define()
rsort()
HTTP
14. This error arises from misusing a function.
Warning
empty()
parentheses
XML
15. The array that stores variables specific to a user's visit
unset()
$_SESSION[]
function
Error
16. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
int
abs()
superglobal
E_STRICT
17. Asynchronous Javascript And XML
AJAX
switch
boolean
predefined
18. To sort the values while maintaining the correlation between each value and its key - in reversed order
variable
SEO
underscores
arsort()
19. To remove all HTML and PHP tags.
strip_tags()
mysql_close($dbc)
preg_replace()
mysql_fetch_array()
20. either hasn't yet been set or is assigned NULL value
<?php
indexed array
null
$varname[key]
21. Use ______ when there are no variables in the string
single quotes
Notice
integer
floor()
22. Used to convert certain HTML tags into their entity versions.
error_reporting (E_ALL & -E_NOTICE)
htmlspecialchars()
Magic Constant
error_reporting (0)
23. Hyper Text Markup Language
error_reporting (E_ALL | E_STRICT)
XML
client-side programing
HTML
24. This fatal error arises from memory allocation problem.
crypt()
Error
array()
abs()
25. PHP has two conditional: if and ______.
$_REQUEST
associative array
switch
function error_reporting()
26. any programing language where the script is parsed on the server
server-side programing
number_format()
predefined
reassign
27. The order of operations.
precedence
0
boolean
error_reporting (E_ALL & -E_NOTICE)
28. Variable names cannot begin with _______
mysql_fetch_array()
numbers
$$
Array
29. a line of information that can be stored in a variable or used in a function or statement
boolean
error_reporting (E_ALL & -E_NOTICE)
string
single quotes
30. Operators used to operate and assign
precedence
+= or -= or *= or /=
Object
ASP
31. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
number_format()
SEO
empty()
integer
32. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
Warning
Array
GET
error_reporting (E_ALL | E_STRICT)
33. Used to find the amount of words in a string.
boolean
server-side programing
$dbc = mysql_connect(hostname, username, password)
str_word_count()
34. All variables must begin with _________.
substr_count()
.=
the dollar sign $
getrandmax()
35. Used to find the length of a string
loops
strlen()
error_reporting (0)
reassign
36. To assign array element values to individual variables
trim()
abs()
list()
unset()
37. function Function used to create a random number
rand()
HTTP
Error
count()
38. To reorganise the array randomly
$_POST[]
shuffle()
!= inequality
echo
39. An array of variables passed in the URL
$_GET[]
mysql
count()
the dollar sign $
40. Hyper Text Transfer Protocol
<?php
drop
HTTP
sort()
41. Alias of rtrim()
mysql_close($dbc)
variable
$var++ and $var
chop()
42. Function can you use to format a number with commas
the period; .
reassign
number_format()
superglobal
43. Use ______ when a variable contains any amount of variables; in general.
double quotes
mysql_fetch_array()
predefined
1
44. container of both data and code
if/elseif/else and switch statements
double quotes
Object
1
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
trim()
substr_count()
error_reporting (E_ALL | E_STRICT)
46. _________ can be used in conditional statements to set precedence
parentheses
$_POST[]
AJAX
date()
47. The ouput of var_export((bool)"NULL");
true
+= or -= or *= or /=
E_STRICT
statement
48. Online applications and resources which are available to the general public with very few restrictions
open source
string
float
int
49. equivalence
==
urlencode()
control structure
+
50. Returns a string with backslashes in front of the specified characters
asort()
addcslashes()
decimal
underscores