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 will not show error reporting - it will be turned off.
E_STRICT
Notice
error_reporting (E_ALL | E_STRICT)
error_reporting (0)
2. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
AJAX
GET
+
index
3. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
trim()
variable
curly braces; ${$total}
POST
4. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
$$
strtok()
reassign
5. To iterate over the keys and values of an array
DTD
array()
foreach loop
AJAX
6. To sort values of an array in reversed order
rsort()
for ($i = 0; $i < count($array); $i++) {statement(s);}
true
trim()
7. Returns a string with backslashes in front of the specified characters
sort()
.=
isset()
addcslashes()
8. says 'if' this then do this 'else' do this or 'while' this do this
^
statement
DTD
boolean
9. An array of variables passed in the URL
>>
$_GET[]
echo
Object
10. does a certain action when called upon
fopen()
function
Shebang
rsort()
11. $_POST Data sent using POST found is sent to _______
strtok()
ceil()
E_STRICT
predefined variable
12. To counter htmlentities()
urlencode()
html_entity_decode()
Shebang
boolean
13. To word wrap after a certain amount of characters.
curly braces
string
str_ireplace()
wordwrap()
14. This fatal error arises from memory allocation problem.
asort()
preg_match()
$_REQUEST
Error
15. To declare a constant
array()
define()
true
open source
16. Online applications and resources which are available to the general public with very few restrictions
open source
int
number_format()
associative array
17. To remove all HTML and PHP tags.
preg_replace()
not
array_merge()
strip_tags()
18. Define(NAME,value)
Constant
array()
the escape character ''
null
19. The name of the #! used to designate the location of the PHP binary
Shebang
isset()
boolean
==
20. Variable names cannot begin with _______
numbers
error_reporting (0)
+
ini_set ('display_errors', 1)
21. container of both data and code
error_reporting (E_ALL | E_STRICT)
indexed array
Object
>>
22. Document Type Definitions
?>
float
is_numeric()
DTD
23. used to round numeric values.
$dbc = mysql_connect(hostname, username, password)
>>
str_word_count()
round() Function
24. When used the value can be passed safely through the URL (GET).
urlencode()
<?php
SEO
bin2hex()
25. Used to find the length of a string
E_STRICT
Array
round() Function
strlen()
26. standard notation
chr()
===
number_format()
decimal
27. identity
===
asort()
boolean
?>
28. bitwise AND
&
array_merge()
echo
boolean
29. Use ________ to have multiple quotations in one string
the escape character ''
the escape character ''
ksort()
curly braces; ${$total}
30. The ouput of var_export((bool)"NULL");
preg_replace()
Notice
true
GET
31. Use ______ when there are no variables in the string
parentheses
SEO
single quotes
curly braces; ${$total}
32. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
unset()
XML
foreach loop
trim()
33. 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.
drop
list()
error_reporting (E_ALL | E_STRICT)
open source
34. Used to check if a variable has a valid numerical value; strings with numerical values pass.
chop()
is_numeric()
function error_reporting()
Constant
35. To create an array
strlen()
array()
htmlentities()
predefined
36. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
drop
Shebang
mysql_fetch_array()
boolean
37. $_SERVER is a ________ variable.
ASP
HTTP
^
predefined
38. To assign keys to the values in an array
array()
define()
ceil()
$dbc = mysql_connect(hostname, username, password)
39. returns the number of matches found by a given search string under this format...
decimal
preg_match()
define()
wordwrap()
40. a positive or negative number
strtok()
integer
HTTP
function
41. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
the period; .
superglobal
float
double quotes
42. _____ is a logical operator
substr_count()
Object
XOR
foreach
43. Function that contains the highest value that rand() can have randomly
Parse error
true
POST
getrandmax()
44. equivalence
SEO
error_reporting (E_ALL & -E_NOTICE)
getrandmax()
==
45. To get time data
<<
substr_count()
isset()
date()
46. The prefix for a dynamic variable - also known as a variable variable
drop
$$
1
sort()
47. signed floating-point value
array()
$_GET[]
html_entity_decode()
float
48. This error arises from misusing a function.
statement
Warning
Object
sql
49. Hyper Text Transfer Protocol
HTTP
str_ireplace()
&
WYSIWYG
50. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
round() Function
chop()
E_STRICT
unset()