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. bitwise left shift
substr_count()
wordwrap()
<<
array
2. To assign array element values to individual variables
boolean
list()
echo
isset()
3. equivalence
server-side programing
the period; .
==
Notice
4. _____ is a logical operator
addslashes()
the escape character ''
XOR
predefined
5. Uses two arguments: constant name and constant definition
Magic Constant
trim()
addslashes()
define()
6. To get over quotation marks while using arrays
curly braces
POST
<<
strtok()
7. either hasn't yet been set or is assigned NULL value
1
open source
null
0
8. bitwise XOR
statement
^
client-side programing
$_SESSION[]
9. To refer to an item in an array
$varname[key]
.=
Shebang
boolean
10. This error arises from misusing a function.
Warning
$dbc = mysql_connect(hostname, username, password)
control structure
null
11. Returns a string with backslashes in front of the specified characters
$$
addcslashes()
Shebang
$_POST[]
12. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
SGML
Shebang
===
13. a type with two possible values: true and false
control structure
Parse error
$_GET[]
boolean
14. print $_SERVER will _____ work if you use the print function on arrays.
integer
not
Constant
sql
15. Search Engine Optimization
?>
fopen()
SEO
ini_set ('display_errors', 1)
16. To declare a constant
$varname[key]
+= or -= or *= or /=
abs()
define()
17. container of ordered data elements
$_REQUEST
Array
$$
number_format()
18. returns the number of matches found by a given search string under this format...
preg_match()
WYSIWYG
echo
E_STRICT
19. The three types of loops in PHP are: for - while - ____.
foreach
substr_count()
function error_reporting()
predefined
20. Converts a string of ASCII characters to hexadecimal values
ASP
strlen()
bin2hex()
array()
21. To sort values of an array in reversed order
$dbc = mysql_connect(hostname, username, password)
rsort()
server-side programing
underscores
22. To create an array
array()
parentheses
list()
?>
23. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
preg_replace()
chr()
Magic Constant
24. The ouput of var_export((bool)"NULL");
true
array
the period; .
nl2br()
25. signed floating-point value
float
single quotes
0
Object
26. The order of operations.
$var++ and $var
precedence
parentheses
$$
27. To counter htmlentities()
html_entity_decode()
count()
server-side programing
+
28. Active Server Pages
addcslashes()
isset()
for ($i = 0; $i < count($array); $i++) {statement(s);}
ASP
29. To determine the amount of elements in an array
$_REQUEST
predefined variable
count()
array()
30. Tag to begin a php script
<?php
number_format()
is_numeric()
E_STRICT
31. Shorthand used to increment and decrement
AJAX
for ($i = 0; $i < count($array); $i++) {statement(s);}
null
$var++ and $var
32. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
PHP
general
floor()
!= inequality
33. The four main error types are:Notice - Warning - ________ and Error.
Hex
Parse error
$_POST[]
substr_count()
34. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
error_reporting (E_ALL | E_STRICT)
echo
!= inequality
35. An array of variables passed with <input /> data
POST
html_entity_decode()
$_POST[]
Shebang
36. The prefix for a dynamic variable - also known as a variable variable
numbers
+= or -= or *= or /=
$$
decimal
37. Function can you use to format a number with commas
Magic Constant
?>
bin2hex()
number_format()
38. To include files - _______ will give errors and _________ will terminate execution().
mysql_fetch_object()
include() and require()
drop
statement
39. a database which is best supported by PHP
substr_count()
mysql
curly braces
server-side programing
40. allows you to split strings based on more complex rules
isset()
loops
preg_split()
SGML
41. 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_close($dbc)
error_reporting (E_ALL | E_STRICT)
double quotes
crypt()
42. Used to create a substring (referred to as a token) from a larger string
count()
strtok()
ceil()
Constant
43. The name of the #! used to designate the location of the PHP binary
Shebang
SGML
GET
Magic Constant
44. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
indexed array
Magic Constant
switch
45. a line of information that can be stored in a variable or used in a function or statement
+= or -= or *= or /=
ini_set ('display_errors', 1)
int
string
46. collection of binary data
$_GET[]
string
underscores
control structure
47. To remove all HTML and PHP tags.
+
strip_tags()
curly braces
unset()
48. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
$var++ and $var
array_merge()
GET
===
49. To reorganise the array randomly
substr_count()
+= or -= or *= or /=
shuffle()
function error_reporting()
50. ___________ can be used with substr() to count backward
count()
addcslashes()
negative numbers
chop()