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. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
addcslashes()
ceil()
==
mysql_fetch_array()
2. Used to convert all HTML tags into their entity versions.
nl2br()
abs()
htmlentities()
curly braces; ${$total}
3. print $_SERVER will _____ work if you use the print function on arrays.
not
nl2br()
PHP
error_reporting (E_ALL)
4. container of both data and code
HTTP
variable
Object
SEO
5. The output of var_export((float)array(0));
<<
error_reporting (E_ALL | E_STRICT)
switch
1
6. bitwise XOR
+= or -= or *= or /=
sort()
Constant
^
7. Variable names cannot begin with _______
numbers
error_reporting (0)
switch
define()
8. TRUE or FALSE
XML
boolean
E_STRICT
octal
9. collection of binary data
string
foreach
associative array
mysql_close($dbc)
10. a positive or negative number
Notice
+= or -= or *= or /=
the period; .
integer
11. To check if a constant is already declared
defined()
strip_tags()
Parse error
predefined
12. signed integer
wordwrap()
addcslashes()
$$
int
13. says 'if' this then do this 'else' do this or 'while' this do this
statement
date()
precedence
SGML
14. This will show all error reporting.
statement
error_reporting (E_ALL)
not
$varname[key]
15. Online applications and resources which are available to the general public with very few restrictions
array_merge()
string
server-side programing
open source
16. To sort the values while maintaining the correlation between each value and its key
asort()
rand()
single quotes
addcslashes()
17. a type with two possible values: true and false
Warning
is_numeric()
boolean
Parse error
18. The prefix for a dynamic variable - also known as a variable variable
Warning
boolean
$$
predefined
19. This will not show error reporting - it will be turned off.
superglobal
error_reporting (0)
if/elseif/else and switch statements
control structure
20. the most basic function in PHP used to output information to the page
ASP
echo
ini_set ('display_errors', 1)
array
21. Standard Generalized Markup Language
$dbc = mysql_connect(hostname, username, password)
SGML
int
integer
22. An array whose keys are strings; also known as a hash.
Hex
mysql_fetch_array()
Parse error
associative array
23. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
mysql_fetch_object()
GET
include() and require()
24. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
the escape character ''
abs()
array
mysql_fetch_object()
25. Used to create a substring (referred to as a token) from a larger string
strtok()
function
mysql_fetch_array()
htmlspecialchars()
26. To delete a variable or an element of an array
array()
$dbc = mysql_connect(hostname, username, password)
server-side programing
unset()
27. All variables must begin with _________.
trim()
variable
the dollar sign $
.=
28. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
Parse error
nl2br()
array()
0
29. ___________ can be used with substr() to count backward
addcslashes()
negative numbers
substr_count()
nl2br()
30. bitwise left shift
boolean
SEO
statement
<<
31. The three types of loops in PHP are: for - while - ____.
.=
curly braces; ${$total}
foreach
?>
32. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$dbc = mysql_connect(hostname, username, password)
$array[] = item
boolean
open source
33. Returns a string with backslashes in front of the specified characters
Notice
addcslashes()
shuffle()
array()
34. Used to encrypt values - it is a one-way encryption method
the period; .
HTML
foreach
crypt()
35. Function used to round up to the highest integer
preg_replace()
integer
ceil()
strlen()
36. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
+
numbers
Error
37. To remove all HTML and PHP tags.
getrandmax()
strip_tags()
substr_count()
superglobal
38. To close a connection between a database
statement
mysql_close($dbc)
trim()
foreach loop
39. addition
+
open source
list()
Parse error
40. The four main error types are:Notice - Warning - ________ and Error.
Parse error
define()
Hex
Error
41. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
$_GET[]
trim()
$$
function
42. Active Server Pages
ASP
$varname[key]
0
$_GET[]
43. This error arises from misusing a function.
preg_split()
error_reporting (E_ALL | E_STRICT)
Warning
>>
44. The array that stores variables specific to a user's visit
$_SESSION[]
loops
indexed array
asort()
45. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
shuffle()
Parse error
<?php
46. equivalence
==
the dollar sign $
is_numeric()
shuffle()
47. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
strip_tags()
arsort()
crypt()
48. To counter htmlentities()
array()
XOR
html_entity_decode()
include() and require()
49. A data structure that can hold a number of items of data of the same type eg. a list of names
client-side programing
the escape character ''
array
shuffle()
50. An array of variables passed with <input /> data
strtok()
str_ireplace()
$_POST[]
is_numeric()