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. This fatal error arises from memory allocation problem.
curly braces; ${$total}
define()
Error
POST
2. To counter htmlentities()
html_entity_decode()
is_numeric()
Hex
array_merge()
3. $_SERVER is a ________ variable.
decimal
associative array
predefined
$$
4. print $_SERVER will _____ work if you use the print function on arrays.
substr_count()
decimal
not
is_numeric()
5. Shorthand used to increment and decrement
error_reporting (E_ALL | E_STRICT)
indexed array
POST
$var++ and $var
6. The ouput of var_export((bool)"NULL");
Error
true
rand()
trim()
7. Variable names cannot begin with _______
numbers
double quotes
$$
XML
8. leading zero: 0100 or 0567
Array
octal
preg_split()
count()
9. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
bin2hex()
function error_reporting()
strip_tags()
10. Function can you use to format a number with commas
boolean
number_format()
mysql
floor()
11. The array that stores variables specific to a user's visit
XOR
round() Function
$_SESSION[]
floor()
12. Define(NAME,value)
open source
Constant
number_format()
define()
13. Function used to round up to the highest integer
>>
chop()
html_entity_decode()
ceil()
14. All variables must begin with _________.
the dollar sign $
Shebang
count()
predefined variable
15. To assign keys to the values in an array
ceil()
array()
list()
Hex
16. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
$_SESSION[]
SEO
superglobal
int
17. To close a connection between a database
control structure
mysql_close($dbc)
GET
isset()
18. Used to replace a substring with another string - it is not case-sensitive.
negative numbers
str_ireplace()
error_reporting (E_ALL)
SGML
19. This will show all error reporting except for notice errors.
$var++ and $var
client-side programing
error_reporting (0)
error_reporting (E_ALL & -E_NOTICE)
20. Function that contains the highest value that rand() can have randomly
predefined
not
getrandmax()
abs()
21. This will show all error reporting.
XML
echo
+= or -= or *= or /=
error_reporting (E_ALL)
22. collection of binary data
the escape character ''
string
date()
htmlentities()
23. does a certain action when called upon
mysql
function
abs()
string
24. Used to check if a variable has a valid numerical value; strings with numerical values pass.
parentheses
is_numeric()
server-side programing
string
25. Hyper Text Markup Language
strtok()
HTML
DTD
array()
26. To reorganise the array randomly
$dbc = mysql_connect(hostname, username, password)
shuffle()
chr()
SEO
27. Hyper Text Transfer Protocol
server-side programing
abs()
define()
HTTP
28. PHP has two conditional: if and ______.
SGML
switch
associative array
PHP
29. Tag to begin a php script
negative numbers
predefined
<?php
addcslashes()
30. Function used to find the absolute value of a number or numeric variable
abs()
predefined variable
parentheses
superglobal
31. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
htmlentities()
precedence
preg_match()
32. This will not show error reporting - it will be turned off.
Notice
error_reporting (0)
1
preg_replace()
33. To sort values of an array in reversed order
rsort()
predefined
precedence
$_POST[]
34. 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.
arsort()
error_reporting (E_ALL | E_STRICT)
$$
ini_set ('display_errors', 1)
35. Control structures that break exit
if/elseif/else and switch statements
htmlentities()
XOR
substr_count()
36. To sort values of an array without regard to the keys
boolean
sort()
Notice
$dbc = mysql_connect(hostname, username, password)
37. $_POST and $_GET are ________ variables.
HTML
fopen()
trim()
predefined
38. Returns a string with backslashes in front of predefined characters
array()
ceil()
loops
addslashes()
39. Document Type Definitions
$_SESSION[]
ksort()
DTD
round() Function
40. To sort the values while maintaining the correlation between each value and its key
asort()
^
$dbc = mysql_connect(hostname, username, password)
html_entity_decode()
41. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
drop
round() Function
octal
42. identity
$_SESSION[]
predefined variable
===
number_format()
43. The order of operations.
?>
precedence
array
htmlspecialchars()
44. EXtensible Markup Language
Error
XML
underscores
fopen()
45. signed floating-point value
<<
float
array()
WYSIWYG
46. A conditional or loop is a ________________.
control structure
predefined
htmlspecialchars()
strip_tags()
47. The output of var_export((float)array(0));
1
floor()
fopen()
the period; .
48. Used to convert all HTML tags into their entity versions.
htmlentities()
rsort()
reassign
SEO
49. This error refers to a variable with no value.
Notice
addslashes()
foreach loop
fopen()
50. The name of the #! used to designate the location of the PHP binary
rsort()
open source
Warning
Shebang