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. _______ is a comparison operator
ini_set ('display_errors', 1)
Array
the period; .
!= inequality
2. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
abs()
Constant
SGML
3. addition
error_reporting (E_ALL)
rsort()
+
+= or -= or *= or /=
4. Shorthand used to increment and decrement
echo
$var++ and $var
HTTP
curly braces
5. A conditional or loop is a ________________.
Hex
control structure
the dollar sign $
Notice
6. To delete a variable or an element of an array
array()
unset()
urlencode()
mysql_close($dbc)
7. A data structure that can hold a number of items of data of the same type eg. a list of names
loops
array
Constant
HTTP
8. Variable names cannot begin with _______
variable
numbers
Constant
open source
9. Used to create a substring (referred to as a token) from a larger string
GET
crypt()
preg_split()
strtok()
10. Used to find the amount of words in a string.
!= inequality
include() and require()
Shebang
str_word_count()
11. function Function used to create a random number
the escape character ''
rand()
define()
indexed array
12. Function used to round down to the lowest integer
floor()
true
isset()
decimal
13. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
number_format()
Array
switch
14. The output of var_export((float)array(0));
HTTP
1
single quotes
!= inequality
15. Use ________ to have multiple quotations in one string
decimal
DTD
XOR
the escape character ''
16. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
parentheses
index
Shebang
17. To assign array element values to individual variables
predefined variable
Error
list()
chop()
18. Returns a string with backslashes in front of the specified characters
indexed array
htmlspecialchars()
Array
addcslashes()
19. To sort values of an array without regard to the keys
Object
statement
sort()
mysql_close($dbc)
20. Search Engine Optimization
!= inequality
SEO
Warning
function
21. Creates a pointer to a file with the declared mode (read - write -etc.).
isset()
fopen()
ceil()
switch
22. bitwise left shift
rand()
E_STRICT
not
<<
23. The name of the #! used to designate the location of the PHP binary
Shebang
trim()
string
count()
24. Use ______ when a variable contains any amount of variables; in general.
predefined variable
error_reporting (E_ALL & -E_NOTICE)
double quotes
preg_match()
25. Returns a character from a specified ASCII value
+= or -= or *= or /=
Array
^
chr()
26. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
boolean
statement
$_GET[]
mysql_fetch_array()
27. To include files - _______ will give errors and _________ will terminate execution().
client-side programing
$_POST[]
mysql_fetch_object()
include() and require()
28. Used to check if a variable has any value (including 0 or FALSE or an empty string).
strip_tags()
isset()
define()
preg_replace()
29. To sort the values while maintaining the correlation between each value and its key
empty()
preg_split()
asort()
arsort()
30. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
$_REQUEST
HTTP
preg_match()
31. To create an array
variable
crypt()
array()
mysql_fetch_object()
32. Converts a string of ASCII characters to hexadecimal values
bin2hex()
sort()
boolean
.=
33. container of ordered data elements
Notice
Array
<?php
substr_count()
34. a language in which to make querys to a database with
sql
Warning
associative array
include() and require()
35. Uses two arguments: constant name and constant definition
if/elseif/else and switch statements
float
define()
mysql_close($dbc)
36. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
not
mysql_fetch_object()
nl2br()
<?php
37. This will show all error reporting except for notice errors.
error_reporting (E_ALL & -E_NOTICE)
control structure
.=
mysql
38. Use ______ when there are no variables in the string
numbers
isset()
negative numbers
single quotes
39. a storage location in the computer's memory that has a type & a name and a contents
isset()
1
variable
drop
40. To get time data
negative numbers
date()
Parse error
defined()
41. container of both data and code
list()
chr()
Object
$_SESSION[]
42. The three types of loops in PHP are: for - while - ____.
precedence
foreach
trim()
switch
43. Operators used to operate and assign
the dollar sign $
function error_reporting()
numbers
+= or -= or *= or /=
44. Tag to end a php script
preg_match()
rsort()
?>
$$
45. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
&
!= inequality
HTTP
nl2br()
46. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
Notice
PHP
ceil()
$array[] = item
47. Tag to begin a php script
statement
<?php
array_merge()
function error_reporting()
48. To set up error reporting
predefined
function error_reporting()
Notice
integer
49. To sort the values while maintaining the correlation between each value and its key - in reversed order
array_merge()
$_SESSION[]
rand()
arsort()
50. signed integer
for ($i = 0; $i < count($array); $i++) {statement(s);}
html_entity_decode()
switch
int