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 word wrap after a certain amount of characters.
if/elseif/else and switch statements
wordwrap()
unset()
chr()
2. Uses two arguments: constant name and constant definition
define()
Hex
curly braces
defined()
3. Used to convert all HTML tags into their entity versions.
htmlentities()
bin2hex()
HTML
for ($i = 0; $i < count($array); $i++) {statement(s);}
4. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
^
octal
number_format()
5. To reorganise the array randomly
shuffle()
wordwrap()
curly braces
mysql_fetch_array()
6. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
associative array
Warning
superglobal
array
7. To remove all HTML and PHP tags.
echo
strip_tags()
predefined
Shebang
8. To determine the amount of elements in an array
count()
isset()
the dollar sign $
true
9. Returns a string with backslashes in front of the specified characters
addcslashes()
the dollar sign $
variable
negative numbers
10. Operators used to operate and assign
^
+= or -= or *= or /=
Hex
$varname[key]
11. To set up error reporting
count()
$var++ and $var
function error_reporting()
strlen()
12. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
single quotes
!= inequality
int
13. bitwise left shift
drop
integer
mysql_fetch_array()
<<
14. ___________ can be used with substr() to count backward
getrandmax()
array
true
negative numbers
15. Active Server Pages
not
$varname[key]
ASP
array
16. Used to check if a variable has a valid numerical value; strings with numerical values pass.
boolean
ini_set ('display_errors', 1)
===
is_numeric()
17. To assign keys to the values in an array
Constant
statement
is_numeric()
array()
18. To check if a constant is already declared
null
trim()
defined()
floor()
19. Used to replace a substring with another string - it is not case-sensitive.
switch
SEO
str_ireplace()
$array[] = item
20. EXtensible Markup Language
XML
number_format()
&
error_reporting (E_ALL & -E_NOTICE)
21. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
predefined
double quotes
Magic Constant
empty()
22. To merge arrays
predefined
error_reporting (E_ALL | E_STRICT)
array_merge()
defined()
23. A conditional or loop is a ________________.
foreach
index
control structure
indexed array
24. allows you to split strings based on more complex rules
preg_split()
curly braces
function
AJAX
25. Returns a character from a specified ASCII value
chr()
floor()
list()
include() and require()
26. To sort the values while maintaining the correlation between each value and its key - in reversed order
floor()
underscores
arsort()
E_STRICT
27. Alias of rtrim()
chop()
rand()
error_reporting (0)
predefined
28. bitwise right shift
$_GET[]
>>
error_reporting (E_ALL & -E_NOTICE)
DTD
29. The name of the #! used to designate the location of the PHP binary
Shebang
echo
htmlentities()
1
30. Function that contains the highest value that rand() can have randomly
empty()
getrandmax()
GET
AJAX
31. Standard Generalized Markup Language
HTTP
asort()
$$
SGML
32. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
mysql_close($dbc)
nl2br()
DTD
double quotes
33. container of both data and code
octal
shuffle()
Object
AJAX
34. To counter htmlentities()
html_entity_decode()
not
>>
ksort()
35. The output of var_export((float)array());
!= inequality
rand()
0
html_entity_decode()
36. To close a connection between a database
str_ireplace()
mysql_close($dbc)
?>
string
37. searches the subject for matches to a given pattern replaced with the given replacement text
.=
preg_replace()
echo
statement
38. To get time data
date()
isset()
open source
E_STRICT
39. To get over quotation marks while using arrays
statement
$dbc = mysql_connect(hostname, username, password)
curly braces
predefined
40. The ouput of var_export((bool)"NULL");
for ($i = 0; $i < count($array); $i++) {statement(s);}
$dbc = mysql_connect(hostname, username, password)
open source
true
41. any programing language where the user must support the language the script is written in
parentheses
date()
client-side programing
===
42. either hasn't yet been set or is assigned NULL value
null
$dbc = mysql_connect(hostname, username, password)
mysql
numbers
43. To reset an array _______ the array() function to the array
==
reassign
arsort()
control structure
44. $_SERVER is a ________ variable.
predefined
XML
single quotes
associative array
45. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
PHP
curly braces; ${$total}
Object
46. _________ can be used in conditional statements to set precedence
variable
server-side programing
parentheses
negative numbers
47. _______ is a comparison operator
mysql
!= inequality
DTD
the escape character ''
48. used to round numeric values.
boolean
list()
loops
round() Function
49. Variable names cannot begin with _______
the period; .
1
precedence
numbers
50. When used the value can be passed safely through the URL (GET).
urlencode()
client-side programing
array_merge()
parentheses