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. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
underscores
reassign
mysql_fetch_array()
$dbc = mysql_connect(hostname, username, password)
2. To refer to an item in an array
$varname[key]
reassign
defined()
Error
3. To word wrap after a certain amount of characters.
boolean
trim()
wordwrap()
is_numeric()
4. Returns a string with backslashes in front of the specified characters
the escape character ''
the dollar sign $
not
addcslashes()
5. leading zero: 0100 or 0567
isset()
defined()
$$
octal
6. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
htmlentities()
$$
trim()
<?php
7. TRUE or FALSE
?>
server-side programing
switch
boolean
8. 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 __________.
fopen()
chop()
curly braces; ${$total}
statement
9. To reset an array _______ the array() function to the array
octal
reassign
htmlspecialchars()
if/elseif/else and switch statements
10. The output of var_export((float)array());
predefined
int
<?php
0
11. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
not
$_REQUEST
Constant
general
12. print $_SERVER will _____ work if you use the print function on arrays.
not
negative numbers
the dollar sign $
crypt()
13. To sort the values while maintaining the correlation between each value and its key - in reversed order
the period; .
arsort()
<?php
$_GET[]
14. ___________ can be used with substr() to count backward
GET
negative numbers
&
Parse error
15. bitwise left shift
ceil()
<<
strlen()
floor()
16. The output of var_export((float)array(0));
sort()
decimal
1
XML
17. used to round numeric values.
round() Function
double quotes
Hex
open source
18. identity
.=
defined()
===
null
19. This will not show error reporting - it will be turned off.
arsort()
error_reporting (0)
$var++ and $var
$_GET[]
20. An array of variables passed in the URL
decimal
$_GET[]
SEO
boolean
21. The syntax for connecting to a database
floor()
$dbc = mysql_connect(hostname, username, password)
mysql_close($dbc)
Object
22. addition
ksort()
1
+
SEO
23. To check if a constant is already declared
defined()
floor()
htmlspecialchars()
numbers
24. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
addcslashes()
loops
include() and require()
25. a storage location in the computer's memory that has a type & a name and a contents
shuffle()
variable
number_format()
echo
26. To counter htmlentities()
parentheses
html_entity_decode()
true
bin2hex()
27. The ouput of var_export((bool)"NULL");
Error
$dbc = mysql_connect(hostname, username, password)
array()
true
28. $_SERVER is a ________ variable.
wordwrap()
associative array
switch
predefined
29. This will show all error reporting except for notice errors.
ASP
error_reporting (0)
client-side programing
error_reporting (E_ALL & -E_NOTICE)
30. The name of the #! used to designate the location of the PHP binary
Shebang
ceil()
null
0
31. To assign array element values to individual variables
Hex
list()
open source
array()
32. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
echo
superglobal
abs()
error_reporting (0)
33. The four main error types are:Notice - Warning - ________ and Error.
<?php
str_word_count()
Parse error
string
34. Hyper Text Markup Language
mysql_close($dbc)
echo
$var++ and $var
HTML
35. signed integer
$varname[key]
error_reporting (0)
int
getrandmax()
36. To sort by the keys while maintaining the correlation between the key and its value
abs()
single quotes
array()
ksort()
37. This fatal error arises from memory allocation problem.
Error
===
$_POST[]
Array
38. a type with two possible values: true and false
sql
Warning
boolean
getrandmax()
39. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
associative array
!= inequality
empty()
open source
40. Variable names cannot begin with _______
ksort()
$$
numbers
is_numeric()
41. Leading 0x: 0x13F or 0xA23
urlencode()
Hex
not
loops
42. Used to find the length of a string
if/elseif/else and switch statements
strlen()
SGML
WYSIWYG
43. Variable names can begin with __________
underscores
str_ireplace()
is_numeric()
round() Function
44. To remove all HTML and PHP tags.
ASP
strip_tags()
<?php
GET
45. A data structure that can hold a number of items of data of the same type eg. a list of names
array
SGML
addcslashes()
error_reporting (E_ALL & -E_NOTICE)
46. the most basic function in PHP used to output information to the page
echo
nl2br()
Parse error
decimal
47. Converts a string of ASCII characters to hexadecimal values
str_word_count()
for ($i = 0; $i < count($array); $i++) {statement(s);}
bin2hex()
Error
48. Search Engine Optimization
SEO
switch
HTML
$_SESSION[]
49. An array of variables passed with <input /> data
str_word_count()
$_POST[]
Object
!= inequality
50. container of both data and code
1
Object
ceil()
preg_match()