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. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
str_ireplace()
trim()
unset()
superglobal
2. An array whose keys are strings; also known as a hash.
0
floor()
preg_replace()
associative array
3. The concatenation operator?
the period; .
parentheses
switch
string
4. The ouput of var_export((bool)"NULL");
true
abs()
POST
mysql_close($dbc)
5. Returns a character from a specified ASCII value
rand()
chr()
htmlentities()
precedence
6. The output of var_export((float)array(0));
1
statement
$_POST[]
predefined
7. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
array()
predefined
single quotes
8. To close a connection between a database
XML
mysql_close($dbc)
boolean
variable
9. The prefix for a dynamic variable - also known as a variable variable
negative numbers
$$
===
string
10. Used to find the length of a string
+
if/elseif/else and switch statements
str_ireplace()
strlen()
11. An array of variables passed in the URL
$_GET[]
float
htmlspecialchars()
nl2br()
12. This error refers to a variable with no value.
wordwrap()
Notice
predefined variable
date()
13. TRUE or FALSE
foreach loop
round() Function
switch
boolean
14. The output of var_export((float)array());
0
predefined variable
str_ireplace()
rsort()
15. To iterate over the values of an array
general
boolean
for ($i = 0; $i < count($array); $i++) {statement(s);}
rand()
16. a line of information that can be stored in a variable or used in a function or statement
error_reporting (0)
E_STRICT
str_word_count()
string
17. Operators used to operate and assign
+= or -= or *= or /=
floor()
Array
$_POST[]
18. A data structure that can hold a number of items of data of the same type eg. a list of names
rsort()
predefined
parentheses
array
19. To remove all HTML and PHP tags.
predefined
preg_match()
error_reporting (0)
strip_tags()
20. Hypertext Preprocessor - a server-side programing language used to create webpages
Constant
PHP
loops
HTTP
21. signed integer
html_entity_decode()
$$
integer
int
22. Function can you use to format a number with commas
===
PHP
number_format()
control structure
23. used to round numeric values.
general
error_reporting (E_ALL | E_STRICT)
round() Function
integer
24. To merge arrays
preg_replace()
array_merge()
+
Hex
25. Function used to round up to the highest integer
addslashes()
general
arsort()
ceil()
26. Used to convert all HTML tags into their entity versions.
int
isset()
htmlentities()
HTML
27. allows you to split strings based on more complex rules
defined()
preg_split()
trim()
include() and require()
28. $_POST and $_GET are ________ variables.
HTTP
predefined
1
if/elseif/else and switch statements
29. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
==
fopen()
define()
30. says 'if' this then do this 'else' do this or 'while' this do this
mysql_close($dbc)
strtok()
statement
general
31. Search Engine Optimization
ini_set ('display_errors', 1)
Parse error
empty()
SEO
32. Define(NAME,value)
unset()
GET
Parse error
Constant
33. Function used to round down to the lowest integer
mysql_fetch_array()
html_entity_decode()
empty()
floor()
34. Variable names can begin with __________
underscores
!= inequality
abs()
double quotes
35. Used to check if a variable has a valid numerical value; strings with numerical values pass.
single quotes
Constant
boolean
is_numeric()
36. ___________ can be used with substr() to count backward
negative numbers
drop
preg_match()
date()
37. Online applications and resources which are available to the general public with very few restrictions
date()
open source
$array[] = item
define()
38. Shorthand used to increment and decrement
0
strip_tags()
substr_count()
$var++ and $var
39. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
true
numbers
rand()
E_STRICT
40. 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 __________.
round() Function
numbers
curly braces; ${$total}
array_merge()
41. Use ________ to have multiple quotations in one string
the escape character ''
superglobal
negative numbers
the escape character ''
42. Used to convert certain HTML tags into their entity versions.
rand()
strtok()
underscores
htmlspecialchars()
43. To sort the values while maintaining the correlation between each value and its key
0
asort()
is_numeric()
list()
44. To counter htmlentities()
$_POST[]
GET
html_entity_decode()
unset()
45. Returns a string with backslashes in front of predefined characters
addslashes()
fopen()
preg_match()
+
46. a positive or negative number
shuffle()
!= inequality
count()
integer
47. identity
HTML
array()
===
round() Function
48. collection of binary data
Error
!= inequality
substr_count()
string
49. bitwise right shift
XML
>>
strip_tags()
date()
50. a storage location in the computer's memory that has a type & a name and a contents
strip_tags()
POST
XML
variable