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. EXtensible Markup Language
predefined
substr_count()
array
XML
2. $_POST Data sent using POST found is sent to _______
predefined variable
function error_reporting()
boolean
numbers
3. To merge arrays
superglobal
array_merge()
int
ceil()
4. The concatenation operator?
associative array
define()
the period; .
addslashes()
5. Control structure that continue exit - they perform specific statements for a determined number of iterations.
null
precedence
mysql_fetch_array()
loops
6. _______ is a comparison operator
error_reporting (E_ALL & -E_NOTICE)
curly braces
!= inequality
mysql_fetch_array()
7. All variables must begin with _________.
the dollar sign $
addslashes()
ceil()
GET
8. Uses two arguments: constant name and constant definition
curly braces; ${$total}
define()
fopen()
predefined variable
9. _________ can be used in conditional statements to set precedence
<?php
ceil()
parentheses
numbers
10. TRUE or FALSE
function
$var++ and $var
<?php
boolean
11. The output of var_export((float)array(0));
floor()
integer
1
is_numeric()
12. allows you to split strings based on more complex rules
chop()
preg_split()
Parse error
==
13. This fatal error arises from memory allocation problem.
preg_match()
strtok()
Error
define()
14. The prefix for a dynamic variable - also known as a variable variable
function error_reporting()
$$
list()
define()
15. The order of operations.
mysql_fetch_object()
array
associative array
precedence
16. Tag to begin a php script
defined()
not
HTML
<?php
17. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
mysql
statement
define()
18. An array whose keys are strings; also known as a hash.
0
associative array
define()
boolean
19. either hasn't yet been set or is assigned NULL value
null
Parse error
array()
chr()
20. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
0
$array[] = item
trim()
drop
21. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
if/elseif/else and switch statements
switch
HTML
22. Use ________ to have multiple quotations in one string
$_GET[]
shuffle()
if/elseif/else and switch statements
the escape character ''
23. To close a connection between a database
error_reporting (E_ALL & -E_NOTICE)
client-side programing
$_SESSION[]
mysql_close($dbc)
24. bitwise XOR
SEO
^
date()
include() and require()
25. addition
$_SESSION[]
strlen()
round() Function
+
26. Shorthand used to increment and decrement
$var++ and $var
$_GET[]
AJAX
mysql_fetch_object()
27. a positive or negative number
integer
ksort()
XML
!= inequality
28. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
float
count()
array
29. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
Magic Constant
mysql_close($dbc)
negative numbers
trim()
30. searches the subject for matches to a given pattern replaced with the given replacement text
mysql
ASP
single quotes
preg_replace()
31. To reset an array _______ the array() function to the array
precedence
define()
reassign
count()
32. Used to encrypt values - it is a one-way encryption method
foreach
PHP
crypt()
XOR
33. a database which is best supported by PHP
echo
mysql
rsort()
empty()
34. Variable names can begin with __________
!= inequality
underscores
Magic Constant
strtok()
35. Standard Generalized Markup Language
number_format()
$_GET[]
SGML
string
36. bitwise left shift
defined()
<<
Warning
define()
37. To reorganise the array randomly
shuffle()
array()
parentheses
htmlspecialchars()
38. Control structures that break exit
if/elseif/else and switch statements
asort()
AJAX
$$
39. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
open source
getrandmax()
fopen()
nl2br()
40. To assign keys to the values in an array
parentheses
array()
rsort()
number_format()
41. says 'if' this then do this 'else' do this or 'while' this do this
statement
double quotes
arsort()
single quotes
42. ____ or key is referred to for a value within an array.
open source
PHP
index
WYSIWYG
43. Use ______ when there are no variables in the string
single quotes
$dbc = mysql_connect(hostname, username, password)
Array
0
44. Used to convert certain HTML tags into their entity versions.
rand()
?>
htmlspecialchars()
client-side programing
45. This error arises from misusing a function.
$_SESSION[]
$dbc = mysql_connect(hostname, username, password)
Error
Warning
46. Used to find the amount of words in a string.
html_entity_decode()
?>
the dollar sign $
str_word_count()
47. To create an array
Warning
array()
indexed array
1
48. Returns a string with backslashes in front of predefined characters
html_entity_decode()
addslashes()
function error_reporting()
>>
49. An array of variables passed with <input /> data
$_POST[]
HTML
Hex
superglobal
50. The ouput of var_export((bool)"NULL");
true
array
client-side programing
Parse error