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. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
defined()
addcslashes()
$_REQUEST
?>
2. Variable names cannot begin with _______
numbers
empty()
error_reporting (E_ALL & -E_NOTICE)
XOR
3. Tag to begin a php script
===
<?php
asort()
switch
4. To sort values of an array in reversed order
mysql_fetch_object()
rsort()
htmlentities()
preg_replace()
5. Uses two arguments: constant name and constant definition
define()
Constant
abs()
string
6. The output of var_export((float)array(0));
addcslashes()
$_SESSION[]
1
str_word_count()
7. To merge arrays
array_merge()
preg_replace()
error_reporting (E_ALL & -E_NOTICE)
loops
8. 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.
&
error_reporting (E_ALL | E_STRICT)
predefined variable
addslashes()
9. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
loops
error_reporting (E_ALL | E_STRICT)
$$
nl2br()
10. leading zero: 0100 or 0567
<<
bin2hex()
octal
rsort()
11. container of both data and code
Object
+= or -= or *= or /=
1
^
12. The ouput of var_export((bool)"NULL");
Error
==
array
true
13. function Function used to create a random number
1
$_SESSION[]
rand()
Constant
14. identity
===
DTD
ksort()
AJAX
15. To reset an array _______ the array() function to the array
integer
html_entity_decode()
Hex
reassign
16. Used to replace a substring with another string - it is not case-sensitive.
SEO
array()
str_ireplace()
octal
17. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
Notice
<<
$array[] = item
define()
18. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_array()
strtok()
error_reporting (E_ALL & -E_NOTICE)
Hex
19. Function that contains the highest value that rand() can have randomly
float
getrandmax()
HTTP
<<
20. Returns a character from a specified ASCII value
$_GET[]
boolean
chr()
the dollar sign $
21. A data structure that can hold a number of items of data of the same type eg. a list of names
asort()
array
SGML
POST
22. Define(NAME,value)
Constant
float
predefined
array_merge()
23. either hasn't yet been set or is assigned NULL value
null
==
underscores
GET
24. Used to create a substring (referred to as a token) from a larger string
$_POST[]
strtok()
mysql
not
25. used to round numeric values.
crypt()
round() Function
HTML
for ($i = 0; $i < count($array); $i++) {statement(s);}
26. The prefix for a dynamic variable - also known as a variable variable
HTML
XOR
$$
curly braces; ${$total}
27. The array that stores variables specific to a user's visit
$_SESSION[]
variable
array()
boolean
28. ___________ can be used with substr() to count backward
number_format()
trim()
predefined variable
negative numbers
29. PHP has two conditional: if and ______.
fopen()
switch
substr_count()
drop
30. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
HTML
Parse error
single quotes
control structure
31. Variable names can begin with __________
AJAX
underscores
===
ini_set ('display_errors', 1)
32. To sort the values while maintaining the correlation between each value and its key
statement
.=
mysql_fetch_object()
asort()
33. says 'if' this then do this 'else' do this or 'while' this do this
chop()
arsort()
Warning
statement
34. This will not show error reporting - it will be turned off.
error_reporting (0)
wordwrap()
count()
rsort()
35. Function can you use to format a number with commas
number_format()
==
curly braces
unset()
36. This fatal error arises from memory allocation problem.
boolean
Error
integer
array()
37. To assign keys to the values in an array
getrandmax()
array()
string
===
38. Creates a pointer to a file with the declared mode (read - write -etc.).
ASP
fopen()
index
ceil()
39. To reorganise the array randomly
shuffle()
define()
!= inequality
PHP
40. An array whose keys are strings; also known as a hash.
abs()
$_GET[]
rand()
associative array
41. To word wrap after a certain amount of characters.
wordwrap()
+
chr()
double quotes
42. This will show all error reporting.
parentheses
error_reporting (E_ALL)
$dbc = mysql_connect(hostname, username, password)
nl2br()
43. $_POST and $_GET are ________ variables.
chr()
Parse error
foreach loop
predefined
44. To remove all HTML and PHP tags.
asort()
control structure
preg_match()
strip_tags()
45. any programing language where the script is parsed on the server
+
ASP
server-side programing
octal
46. EXtensible Markup Language
htmlspecialchars()
the period; .
XML
sql
47. An array of variables passed with <input /> data
boolean
$_POST[]
Constant
unset()
48. Leading 0x: 0x13F or 0xA23
decimal
Error
Hex
single quotes
49. An array of variables passed in the URL
rsort()
HTTP
$_GET[]
Shebang
50. Shorthand used to increment and decrement
&
$var++ and $var
unset()
ksort()