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. Function used to round up to the highest integer
ceil()
SEO
Array
error_reporting (E_ALL & -E_NOTICE)
2. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
isset()
POST
empty()
date()
3. To assign array element values to individual variables
list()
bin2hex()
boolean
strlen()
4. To word wrap after a certain amount of characters.
include() and require()
string
wordwrap()
HTML
5. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
$var++ and $var
array_merge()
urlencode()
6. To set up error reporting
sql
function error_reporting()
define()
general
7. a database which is best supported by PHP
mysql
preg_match()
associative array
XOR
8. To assign keys to the values in an array
HTML
array()
abs()
wordwrap()
9. _____ is a logical operator
XOR
preg_match()
numbers
+
10. bitwise right shift
single quotes
$$
>>
&
11. Returns a character from a specified ASCII value
addcslashes()
htmlspecialchars()
chr()
ASP
12. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
reassign
define()
the dollar sign $
13. The array that stores variables specific to a user's visit
Constant
$_SESSION[]
function error_reporting()
str_word_count()
14. To reorganise the array randomly
Magic Constant
shuffle()
error_reporting (E_ALL & -E_NOTICE)
substr_count()
15. Use ________ to have multiple quotations in one string
str_ireplace()
decimal
true
the escape character ''
16. To reset an array _______ the array() function to the array
+
variable
mysql_fetch_array()
reassign
17. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
include() and require()
Parse error
underscores
variable
18. any programing language where the user must support the language the script is written in
$varname[key]
client-side programing
error_reporting (0)
nl2br()
19. $_POST and $_GET are ________ variables.
switch
predefined
array()
null
20. The concatenation operator?
function error_reporting()
the period; .
Array
general
21. bitwise left shift
preg_match()
str_word_count()
<<
list()
22. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
str_ireplace()
mysql_fetch_object()
Parse error
array()
23. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
double quotes
$array[] = item
int
general
24. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
ini_set ('display_errors', 1)
htmlentities()
function error_reporting()
25. Hypertext Preprocessor - a server-side programing language used to create webpages
Magic Constant
1
Parse error
PHP
26. Tag to begin a php script
number_format()
fopen()
getrandmax()
<?php
27. 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.
sort()
ksort()
error_reporting (E_ALL | E_STRICT)
htmlentities()
28. any programing language where the script is parsed on the server
server-side programing
open source
rsort()
ceil()
29. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
POST
GET
count()
30. To remove all HTML and PHP tags.
true
strip_tags()
underscores
rand()
31. To get time data
$_REQUEST
loops
shuffle()
date()
32. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
define()
$$
preg_replace()
33. Use ______ when there are no variables in the string
XOR
Magic Constant
$$
single quotes
34. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
wordwrap()
numbers
$_REQUEST
sort()
35. either hasn't yet been set or is assigned NULL value
open source
error_reporting (0)
null
shuffle()
36. searches the subject for matches to a given pattern replaced with the given replacement text
substr_count()
preg_replace()
getrandmax()
associative array
37. The name of the #! used to designate the location of the PHP binary
Shebang
preg_match()
array_merge()
+
38. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
nl2br()
urlencode()
Magic Constant
$$
39. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
.=
Object
ceil()
40. Standard Generalized Markup Language
is_numeric()
WYSIWYG
SGML
define()
41. signed floating-point value
function error_reporting()
preg_split()
float
Parse error
42. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
integer
htmlspecialchars()
define()
43. To merge arrays
array_merge()
&
Object
floor()
44. Function can you use to format a number with commas
===
float
strip_tags()
number_format()
45. Operators used to operate and assign
Error
$varname[key]
+= or -= or *= or /=
boolean
46. To sort values of an array in reversed order
PHP
urlencode()
rsort()
==
47. To iterate over the values of an array
Array
error_reporting (E_ALL)
for ($i = 0; $i < count($array); $i++) {statement(s);}
integer
48. What You See Is What You Get
preg_match()
Parse error
general
WYSIWYG
49. used to round numeric values.
<?php
abs()
Parse error
round() Function
50. Tag to end a php script
wordwrap()
?>
PHP
boolean