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 show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
addslashes()
if/elseif/else and switch statements
$var++ and $var
2. Used to convert all HTML tags into their entity versions.
htmlentities()
reassign
underscores
$_GET[]
3. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
Warning
&
date()
4. To create an array
array()
fopen()
define()
arsort()
5. Tag to begin a php script
<?php
mysql_fetch_array()
the period; .
for ($i = 0; $i < count($array); $i++) {statement(s);}
6. To get time data
underscores
date()
Array
XOR
7. Used to check if a variable has a valid numerical value; strings with numerical values pass.
floor()
preg_match()
chr()
is_numeric()
8. says 'if' this then do this 'else' do this or 'while' this do this
fopen()
the period; .
bin2hex()
statement
9. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
empty()
preg_split()
strlen()
10. This error refers to a variable with no value.
&
Notice
round() Function
==
11. signed floating-point value
isset()
Warning
float
===
12. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
control structure
the dollar sign $
^
empty()
13. Hyper Text Markup Language
HTTP
general
Array
HTML
14. To word wrap after a certain amount of characters.
reassign
wordwrap()
indexed array
not
15. returns the number of matches found by a given search string under this format...
sort()
preg_match()
ASP
int
16. To iterate over the values of an array
DTD
for ($i = 0; $i < count($array); $i++) {statement(s);}
XML
foreach loop
17. Standard Generalized Markup Language
SGML
if/elseif/else and switch statements
decimal
Notice
18. a database which is best supported by PHP
mysql
server-side programing
ceil()
Notice
19. bitwise AND
<?php
trim()
&
abs()
20. Function used to round down to the lowest integer
floor()
mysql_close($dbc)
$_REQUEST
include() and require()
21. $_POST Data sent using POST found is sent to _______
?>
<<
predefined variable
>>
22. bitwise left shift
variable
isset()
<<
===
23. Asynchronous Javascript And XML
the period; .
WYSIWYG
strtok()
AJAX
24. Converts a string of ASCII characters to hexadecimal values
bin2hex()
$dbc = mysql_connect(hostname, username, password)
str_ireplace()
indexed array
25. To sort the values while maintaining the correlation between each value and its key
defined()
echo
asort()
HTTP
26. Control structures that break exit
if/elseif/else and switch statements
preg_split()
foreach loop
Object
27. To sort values of an array in reversed order
rand()
==
echo
rsort()
28. ___________ can be used with substr() to count backward
negative numbers
reassign
mysql_fetch_array()
$var++ and $var
29. A data structure that can hold a number of items of data of the same type eg. a list of names
array
switch
error_reporting (E_ALL)
decimal
30. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
Parse error
ceil()
date()
31. Used to encrypt values - it is a one-way encryption method
predefined
$array[] = item
strtok()
crypt()
32. To find how many substrings are in a string
switch
round() Function
substr_count()
PHP
33. To sort the values while maintaining the correlation between each value and its key - in reversed order
parentheses
1
arsort()
preg_match()
34. identity
sql
===
getrandmax()
arsort()
35. 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
36. The syntax for connecting to a database
<?php
$dbc = mysql_connect(hostname, username, password)
indexed array
Warning
37. Used to find the length of a string
AJAX
strlen()
unset()
$dbc = mysql_connect(hostname, username, password)
38. _________ can be used in conditional statements to set precedence
parentheses
if/elseif/else and switch statements
$_POST[]
<?php
39. Used to check if a variable has any value (including 0 or FALSE or an empty string).
octal
getrandmax()
E_STRICT
isset()
40. container of both data and code
the escape character ''
Object
error_reporting (0)
mysql_close($dbc)
41. A conditional or loop is a ________________.
variable
predefined
control structure
E_STRICT
42. a type with two possible values: true and false
variable
rsort()
boolean
the dollar sign $
43. a language in which to make querys to a database with
variable
include() and require()
+
sql
44. Shorthand used to increment and decrement
octal
$var++ and $var
!= inequality
$varname[key]
45. signed integer
addslashes()
unset()
int
superglobal
46. Returns a string with backslashes in front of predefined characters
addslashes()
>>
rand()
str_word_count()
47. Hyper Text Transfer Protocol
the escape character ''
defined()
.=
HTTP
48. An array of variables passed with <input /> data
$_POST[]
date()
Parse error
function
49. To assign keys to the values in an array
index
sort()
DTD
array()
50. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
date()
trim()
Shebang
$_SESSION[]