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. To include files - _______ will give errors and _________ will terminate execution().
trim()
addslashes()
include() and require()
indexed array
2. addition
XOR
string
reassign
+
3. This fatal error arises from memory allocation problem.
Error
float
indexed array
Magic Constant
4. Used to encrypt values - it is a one-way encryption method
crypt()
Magic Constant
PHP
bin2hex()
5. container of ordered data elements
drop
Array
Hex
function
6. a type with two possible values: true and false
mysql
boolean
Parse error
error_reporting (0)
7. Use ______ when there are no variables in the string
single quotes
underscores
$varname[key]
unset()
8. a language in which to make querys to a database with
sql
Magic Constant
predefined
open source
9. Function that contains the highest value that rand() can have randomly
getrandmax()
number_format()
nl2br()
===
10. bitwise AND
server-side programing
&
WYSIWYG
htmlentities()
11. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
client-side programing
HTML
error_reporting (E_ALL | E_STRICT)
12. Used to create a substring (referred to as a token) from a larger string
urlencode()
mysql_fetch_object()
null
strtok()
13. Operators used to operate and assign
XML
empty()
$array[] = item
+= or -= or *= or /=
14. To iterate over the keys and values of an array
predefined
foreach loop
+= or -= or *= or /=
substr_count()
15. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
<?php
0
error_reporting (E_ALL | E_STRICT)
16. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
Constant
DTD
error_reporting (E_ALL | E_STRICT)
general
17. An array of variables passed with <input /> data
$_POST[]
urlencode()
float
$dbc = mysql_connect(hostname, username, password)
18. This will show all errors that fall under E_ALL or E_STRICT - the pipe | is used for 'or' so that errors that fall under either will be shown.
mysql_fetch_array()
error_reporting (E_ALL | E_STRICT)
1
curly braces; ${$total}
19. $_POST and $_GET are ________ variables.
associative array
predefined
PHP
$varname[key]
20. The four main error types are:Notice - Warning - ________ and Error.
HTTP
Parse error
mysql
ksort()
21. To assign array element values to individual variables
list()
variable
octal
control structure
22. a storage location in the computer's memory that has a type & a name and a contents
if/elseif/else and switch statements
variable
GET
addcslashes()
23. A data structure that can hold a number of items of data of the same type eg. a list of names
array
rsort()
decimal
int
24. Used to check if a variable has any value (including 0 or FALSE or an empty string).
AJAX
Magic Constant
arsort()
isset()
25. To sort the values while maintaining the correlation between each value and its key - in reversed order
+= or -= or *= or /=
arsort()
decimal
Magic Constant
26. Function can you use to format a number with commas
preg_split()
number_format()
<<
===
27. The three types of loops in PHP are: for - while - ____.
echo
preg_match()
foreach
<?php
28. The ouput of var_export((bool)"NULL");
Constant
0
true
ceil()
29. _____ is a logical operator
precedence
XOR
Constant
Shebang
30. Returns a character from a specified ASCII value
chr()
curly braces
array_merge()
Object
31. Use ________ to have multiple quotations in one string
echo
boolean
the escape character ''
the dollar sign $
32. Online applications and resources which are available to the general public with very few restrictions
POST
open source
index
trim()
33. To create an array
predefined variable
array()
$array[] = item
ksort()
34. Hypertext Preprocessor - a server-side programing language used to create webpages
PHP
predefined
XOR
XML
35. standard notation
getrandmax()
array()
==
decimal
36. Uses two arguments: constant name and constant definition
define()
$array[] = item
array()
strlen()
37. The array that stores variables specific to a user's visit
int
XML
$_SESSION[]
$array[] = item
38. a database which is best supported by PHP
1
mysql
nl2br()
Parse error
39. identity
Notice
==
!= inequality
===
40. To sort values of an array without regard to the keys
Shebang
==
sort()
addcslashes()
41. To assign keys to the values in an array
Constant
octal
wordwrap()
array()
42. Active Server Pages
include() and require()
mysql
ASP
statement
43. This will show all error reporting.
single quotes
mysql
server-side programing
error_reporting (E_ALL)
44. The syntax for connecting to a database
WYSIWYG
$dbc = mysql_connect(hostname, username, password)
HTTP
$$
45. To word wrap after a certain amount of characters.
client-side programing
wordwrap()
$_REQUEST
foreach loop
46. leading zero: 0100 or 0567
drop
chop()
not
octal
47. Alias of rtrim()
drop
chop()
$$
E_STRICT
48. signed floating-point value
float
numbers
.=
$_REQUEST
49. To reset an array _______ the array() function to the array
int
reassign
shuffle()
number_format()
50. To set up error reporting
function error_reporting()
Magic Constant
decimal
<?php