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. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
defined()
client-side programing
reassign
2. ____ or key is referred to for a value within an array.
for ($i = 0; $i < count($array); $i++) {statement(s);}
not
index
error_reporting (0)
3. An array of variables passed in the URL
predefined
$_GET[]
loops
single quotes
4. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
$dbc = mysql_connect(hostname, username, password)
str_ireplace()
nl2br()
DTD
5. To find how many substrings are in a string
date()
Parse error
abs()
substr_count()
6. Returns a character from a specified ASCII value
chr()
boolean
client-side programing
DTD
7. To sort values of an array without regard to the keys
strtok()
Constant
sort()
error_reporting (E_ALL & -E_NOTICE)
8. a database which is best supported by PHP
mysql
associative array
$var++ and $var
html_entity_decode()
9. leading zero: 0100 or 0567
rsort()
addcslashes()
.=
octal
10. To get time data
+
addcslashes()
function
date()
11. Returns a string with backslashes in front of the specified characters
addcslashes()
double quotes
parentheses
indexed array
12. function Function used to create a random number
Error
rand()
index
strip_tags()
13. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
&
mysql_fetch_array()
float
POST
14. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
strip_tags()
function
single quotes
superglobal
15. bitwise right shift
>>
numbers
===
include() and require()
16. Control structures that break exit
if/elseif/else and switch statements
mysql_fetch_array()
AJAX
index
17. 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
18. Active Server Pages
DTD
ASP
function error_reporting()
list()
19. Function can you use to format a number with commas
reassign
if/elseif/else and switch statements
number_format()
fopen()
20. equivalence
function error_reporting()
single quotes
==
Error
21. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
mysql_fetch_object()
nl2br()
<?php
defined()
22. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
boolean
drop
$array[] = item
<?php
23. All variables must begin with _________.
Magic Constant
+= or -= or *= or /=
the dollar sign $
^
24. An array whose keys are strings; also known as a hash.
error_reporting (E_ALL)
associative array
number_format()
htmlspecialchars()
25. any programing language where the user must support the language the script is written in
SEO
null
client-side programing
if/elseif/else and switch statements
26. To determine the amount of elements in an array
?>
count()
the period; .
superglobal
27. To assign keys to the values in an array
mysql_fetch_array()
array()
addcslashes()
superglobal
28. says 'if' this then do this 'else' do this or 'while' this do this
$_GET[]
number_format()
ASP
statement
29. bitwise AND
HTML
1
string
&
30. To iterate over the values of an array
crypt()
for ($i = 0; $i < count($array); $i++) {statement(s);}
str_ireplace()
Object
31. What You See Is What You Get
WYSIWYG
substr_count()
preg_replace()
negative numbers
32. To reset an array _______ the array() function to the array
date()
Object
reassign
$_GET[]
33. print $_SERVER will _____ work if you use the print function on arrays.
float
array
not
mysql_close($dbc)
34. 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 __________.
curly braces; ${$total}
Parse error
loops
empty()
35. Used to encrypt values - it is a one-way encryption method
curly braces; ${$total}
asort()
mysql_fetch_array()
crypt()
36. Asynchronous Javascript And XML
AJAX
index
addslashes()
list()
37. any programing language where the script is parsed on the server
XOR
superglobal
server-side programing
SGML
38. Used to find the amount of words in a string.
array()
SGML
str_word_count()
is_numeric()
39. The output of var_export((float)array());
0
str_word_count()
HTTP
$dbc = mysql_connect(hostname, username, password)
40. When used the value can be passed safely through the URL (GET).
indexed array
string
error_reporting (0)
urlencode()
41. To declare a constant
reassign
$varname[key]
XOR
define()
42. Hyper Text Transfer Protocol
1
mysql
HTTP
statement
43. To merge arrays
error_reporting (E_ALL & -E_NOTICE)
array_merge()
boolean
$_SESSION[]
44. An array of variables passed with <input /> data
define()
defined()
$_POST[]
loops
45. The name of the #! used to designate the location of the PHP binary
sql
ASP
empty()
Shebang
46. The three types of loops in PHP are: for - while - ____.
floor()
getrandmax()
foreach
preg_match()
47. To create an array
array()
HTTP
HTML
the escape character ''
48. Use ______ when there are no variables in the string
str_word_count()
single quotes
HTML
==
49. To sort the values while maintaining the correlation between each value and its key
variable
underscores
<<
asort()
50. identity
===
empty()
array()
index