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. Uses two arguments: constant name and constant definition
precedence
==
define()
underscores
2. bitwise AND
string
define()
&
crypt()
3. the most basic function in PHP used to output information to the page
define()
chr()
variable
echo
4. This will show all error reporting.
WYSIWYG
floor()
bin2hex()
error_reporting (E_ALL)
5. What You See Is What You Get
Magic Constant
mysql_fetch_array()
WYSIWYG
client-side programing
6. signed floating-point value
error_reporting (0)
indexed array
float
round() Function
7. leading zero: 0100 or 0567
^
$varname[key]
Constant
octal
8. To iterate over the values of an array
not
for ($i = 0; $i < count($array); $i++) {statement(s);}
true
variable
9. Use ________ to have multiple quotations in one string
empty()
Warning
>>
the escape character ''
10. $_POST Data sent using POST found is sent to _______
function
?>
predefined variable
WYSIWYG
11. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
unset()
HTTP
array()
12. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
true
empty()
preg_replace()
str_ireplace()
13. To determine the amount of elements in an array
htmlspecialchars()
count()
$dbc = mysql_connect(hostname, username, password)
if/elseif/else and switch statements
14. To close a connection between a database
mysql_close($dbc)
$_POST[]
array()
addslashes()
15. says 'if' this then do this 'else' do this or 'while' this do this
statement
count()
crypt()
$dbc = mysql_connect(hostname, username, password)
16. standard notation
rsort()
$_POST[]
the dollar sign $
decimal
17. Function used to round up to the highest integer
Notice
addcslashes()
ceil()
the escape character ''
18. This error refers to a variable with no value.
isset()
Notice
define()
<<
19. signed integer
nl2br()
preg_match()
predefined variable
int
20. To create an array
$_GET[]
array()
Array
!= inequality
21. An array of variables passed in the URL
getrandmax()
$_GET[]
PHP
function
22. Used to encrypt values - it is a one-way encryption method
AJAX
crypt()
mysql_fetch_array()
str_ireplace()
23. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
string
curly braces
$_GET[]
24. Standard Generalized Markup Language
define()
strtok()
nl2br()
SGML
25. Function that contains the highest value that rand() can have randomly
predefined variable
open source
$var++ and $var
getrandmax()
26. Hyper Text Transfer Protocol
HTTP
addcslashes()
Array
the escape character ''
27. Define(NAME,value)
Error
Array
Constant
integer
28. Online applications and resources which are available to the general public with very few restrictions
predefined
$var++ and $var
open source
superglobal
29. An array whose keys are strings; also known as a hash.
associative array
HTML
asort()
float
30. The name of the #! used to designate the location of the PHP binary
unset()
Shebang
superglobal
strip_tags()
31. An array whose keys are numbers.
indexed array
predefined variable
ASP
$array[] = item
32. Use ______ when a variable contains any amount of variables; in general.
mysql
double quotes
ASP
predefined
33. The prefix for a dynamic variable - also known as a variable variable
floor()
&
$$
rand()
34. 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
35. Operators used to operate and assign
$var++ and $var
server-side programing
Error
+= or -= or *= or /=
36. To set up error reporting
decimal
function
switch
function error_reporting()
37. This will show all error reporting except for notice errors.
loops
SEO
error_reporting (E_ALL & -E_NOTICE)
Constant
38. Control structure that continue exit - they perform specific statements for a determined number of iterations.
mysql_fetch_object()
ksort()
loops
octal
39. container of ordered data elements
AJAX
sort()
Array
defined()
40. Shorthand used to increment and decrement
$var++ and $var
<?php
echo
client-side programing
41. This fatal error arises from memory allocation problem.
Notice
list()
predefined variable
Error
42. Function can you use to format a number with commas
if/elseif/else and switch statements
number_format()
precedence
single quotes
43. To find how many substrings are in a string
htmlspecialchars()
Parse error
date()
substr_count()
44. Used to convert certain HTML tags into their entity versions.
count()
ASP
htmlspecialchars()
general
45. To put a dollar sign before a variable like $10 where 10 is the variable's value - you can escape the first dollar sign; $$cost; or you can use __________.
statement
SEO
curly braces; ${$total}
Array
46. a positive or negative number
crypt()
array_merge()
integer
urlencode()
47. $_POST and $_GET are ________ variables.
drop
predefined
XML
<?php
48. Returns a character from a specified ASCII value
$_POST[]
chr()
AJAX
XOR
49. To sort the values while maintaining the correlation between each value and its key
shuffle()
str_word_count()
drop
asort()
50. To delete a variable or an element of an array
int
reassign
crypt()
unset()