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 declare a constant
XML
str_ireplace()
<?php
define()
2. Control structures that break exit
float
the period; .
if/elseif/else and switch statements
html_entity_decode()
3. To reorganise the array randomly
+= or -= or *= or /=
shuffle()
is_numeric()
sql
4. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
Parse error
E_STRICT
SGML
general
5. The array that stores variables specific to a user's visit
$_SESSION[]
unset()
substr_count()
array_merge()
6. does a certain action when called upon
ksort()
sort()
shuffle()
function
7. This will not show error reporting - it will be turned off.
octal
error_reporting (0)
list()
getrandmax()
8. To set up error reporting
mysql_close($dbc)
function error_reporting()
reassign
$_GET[]
9. leading zero: 0100 or 0567
$_POST[]
indexed array
octal
predefined
10. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_array()
empty()
chr()
ksort()
11. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
XML
XOR
strip_tags()
12. To sort values of an array in reversed order
rsort()
rand()
error_reporting (E_ALL | E_STRICT)
SGML
13. An array whose keys are numbers.
$var++ and $var
predefined
indexed array
Constant
14. a storage location in the computer's memory that has a type & a name and a contents
Hex
ceil()
predefined
variable
15. The three types of loops in PHP are: for - while - ____.
foreach
list()
switch
strlen()
16. Standard Generalized Markup Language
sql
SGML
float
<?php
17. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
Parse error
^
mysql_fetch_array()
substr_count()
18. Returns a string with backslashes in front of the specified characters
addcslashes()
not
array()
Warning
19. This will show all error reporting.
===
error_reporting (E_ALL)
Array
Warning
20. To sort the values while maintaining the correlation between each value and its key
asort()
curly braces
define()
Object
21. allows you to split strings based on more complex rules
include() and require()
Parse error
preg_split()
floor()
22. Alias of rtrim()
drop
chop()
predefined
DTD
23. Function used to round up to the highest integer
boolean
ceil()
is_numeric()
reassign
24. To counter htmlentities()
predefined variable
number_format()
asort()
html_entity_decode()
25. Tag to end a php script
?>
strtok()
loops
define()
26. _____ is a logical operator
curly braces
true
XOR
negative numbers
27. Returns a character from a specified ASCII value
boolean
chr()
integer
string
28. Returns a string with backslashes in front of predefined characters
addslashes()
true
function
open source
29. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
XOR
Magic Constant
urlencode()
float
30. addition
underscores
Parse error
arsort()
+
31. All variables must begin with _________.
the dollar sign $
curly braces; ${$total}
Object
integer
32. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
SGML
superglobal
octal
E_STRICT
33. The concatenation operator?
negative numbers
XOR
the period; .
^
34. searches the subject for matches to a given pattern replaced with the given replacement text
str_word_count()
abs()
preg_replace()
array()
35. Active Server Pages
Notice
ASP
GET
chop()
36. the most basic function in PHP used to output information to the page
control structure
Warning
echo
chr()
37. Tag to begin a php script
client-side programing
<?php
preg_replace()
shuffle()
38. To close a connection between a database
error_reporting (E_ALL | E_STRICT)
mysql_close($dbc)
strlen()
define()
39. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
WYSIWYG
for ($i = 0; $i < count($array); $i++) {statement(s);}
urlencode()
GET
40. Used to find the length of a string
strlen()
defined()
curly braces; ${$total}
general
41. Use ________ to have multiple quotations in one string
GET
the escape character ''
WYSIWYG
the period; .
42. ___________ can be used with substr() to count backward
getrandmax()
negative numbers
GET
ini_set ('display_errors', 1)
43. To get over quotation marks while using arrays
error_reporting (E_ALL | E_STRICT)
curly braces
preg_match()
mysql_fetch_array()
44. This error arises from misusing a function.
sort()
array()
parentheses
Warning
45. Used to display errors in a particular script - should be placed at top of script.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
46. An array of variables passed in the URL
define()
chop()
round() Function
$_GET[]
47. Function can you use to format a number with commas
number_format()
DTD
array()
sort()
48. container of ordered data elements
Array
Shebang
control structure
E_STRICT
49. bitwise AND
curly braces; ${$total}
substr_count()
the escape character ''
&
50. Used to create a substring (referred to as a token) from a larger string
for ($i = 0; $i < count($array); $i++) {statement(s);}
trim()
bin2hex()
strtok()