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. To sort values of an array without regard to the keys
sort()
PHP
shuffle()
$$
2. bitwise left shift
htmlspecialchars()
<<
indexed array
POST
3. 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.
decimal
function error_reporting()
Parse error
error_reporting (E_ALL | E_STRICT)
4. Used to create a substring (referred to as a token) from a larger string
strtok()
Parse error
error_reporting (E_ALL)
crypt()
5. $_POST Data sent using POST found is sent to _______
predefined variable
general
Shebang
PHP
6. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
the period; .
function
Warning
7. a line of information that can be stored in a variable or used in a function or statement
string
$$
html_entity_decode()
numbers
8. container of both data and code
Object
empty()
Magic Constant
arsort()
9. To delete a variable or an element of an array
unset()
&
decimal
Object
10. The array that stores variables specific to a user's visit
empty()
preg_match()
$_SESSION[]
mysql
11. Define(NAME,value)
ASP
index
Constant
XML
12. Function that contains the highest value that rand() can have randomly
negative numbers
curly braces; ${$total}
getrandmax()
chr()
13. 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 __________.
curly braces; ${$total}
htmlspecialchars()
is_numeric()
associative array
14. does a certain action when called upon
html_entity_decode()
<<
substr_count()
function
15. To sort the values while maintaining the correlation between each value and its key - in reversed order
drop
negative numbers
error_reporting (E_ALL & -E_NOTICE)
arsort()
16. Returns a string with backslashes in front of predefined characters
E_STRICT
addslashes()
$dbc = mysql_connect(hostname, username, password)
chop()
17. An array of variables passed with <input /> data
$_POST[]
control structure
abs()
associative array
18. signed integer
int
loops
array_merge()
HTML
19. This error arises from misusing a function.
null
Parse error
Warning
urlencode()
20. a positive or negative number
str_word_count()
integer
Array
control structure
21. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
$dbc = mysql_connect(hostname, username, password)
Constant
+
nl2br()
22. To close a connection between a database
mysql_close($dbc)
double quotes
preg_split()
boolean
23. equivalence
predefined
is_numeric()
==
asort()
24. either hasn't yet been set or is assigned NULL value
null
if/elseif/else and switch statements
define()
$_SESSION[]
25. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
XOR
$array[] = item
switch
boolean
26. Leading 0x: 0x13F or 0xA23
Hex
strtok()
<?php
Notice
27. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
if/elseif/else and switch statements
mysql_close($dbc)
wordwrap()
28. _________ can be used in conditional statements to set precedence
parentheses
sort()
superglobal
define()
29. To sort values of an array in reversed order
boolean
rsort()
echo
SEO
30. The four main error types are:Notice - Warning - ________ and Error.
octal
DTD
0
Parse error
31. allows you to split strings based on more complex rules
preg_split()
unset()
$var++ and $var
defined()
32. searches the subject for matches to a given pattern replaced with the given replacement text
preg_replace()
array()
floor()
predefined variable
33. Used to find the length of a string
E_STRICT
statement
underscores
strlen()
34. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
the escape character ''
preg_split()
E_STRICT
superglobal
35. Alias of rtrim()
XOR
chop()
$_POST[]
switch
36. The order of operations.
ini_set ('display_errors', 1)
AJAX
htmlspecialchars()
precedence
37. standard notation
decimal
precedence
the dollar sign $
str_ireplace()
38. a type with two possible values: true and false
indexed array
bin2hex()
int
boolean
39. The concatenation operator?
statement
AJAX
numbers
the period; .
40. Function used to find the absolute value of a number or numeric variable
indexed array
abs()
server-side programing
$array[] = item
41. Online applications and resources which are available to the general public with very few restrictions
statement
Parse error
client-side programing
open source
42. collection of binary data
statement
index
string
curly braces
43. To reorganise the array randomly
Parse error
count()
mysql_fetch_array()
shuffle()
44. TRUE or FALSE
Parse error
POST
boolean
include() and require()
45. To remove all HTML and PHP tags.
XML
predefined variable
function
strip_tags()
46. a language in which to make querys to a database with
sql
foreach loop
Constant
float
47. the most basic function in PHP used to output information to the page
echo
nl2br()
$_SESSION[]
superglobal
48. To assign array element values to individual variables
isset()
addslashes()
list()
date()
49. Use ______ when there are no variables in the string
single quotes
int
substr_count()
associative array
50. To refer to an item in an array
boolean
double quotes
the dollar sign $
$varname[key]