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. Uses two arguments: constant name and constant definition
ini_set ('display_errors', 1)
define()
error_reporting (0)
boolean
2. To get time data
date()
string
switch
E_STRICT
3. The ouput of var_export((bool)"NULL");
ASP
str_ireplace()
true
boolean
4. Used to convert certain HTML tags into their entity versions.
AJAX
bin2hex()
not
htmlspecialchars()
5. The concatenation operator?
the period; .
DTD
error_reporting (E_ALL & -E_NOTICE)
$_SESSION[]
6. a positive or negative number
precedence
integer
double quotes
chop()
7. identity
curly braces
Array
===
str_word_count()
8. The name of the #! used to designate the location of the PHP binary
the escape character ''
POST
array()
Shebang
9. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
<?php
<<
ASP
10. Alias of rtrim()
Parse error
decimal
chop()
===
11. The concatenation assignment operator?
.=
$_POST[]
strlen()
GET
12. Use ______ when a variable contains any amount of variables; in general.
list()
Parse error
SGML
double quotes
13. Used to display errors in a particular script - should be placed at top of script.
14. Hypertext Preprocessor - a server-side programing language used to create webpages
htmlspecialchars()
fopen()
PHP
addslashes()
15. To reset an array _______ the array() function to the array
+
foreach loop
reassign
str_word_count()
16. Search Engine Optimization
chop()
SEO
Array
nl2br()
17. _____ is a logical operator
XOR
error_reporting (E_ALL & -E_NOTICE)
htmlspecialchars()
ini_set ('display_errors', 1)
18. $_POST Data sent using POST found is sent to _______
nl2br()
Constant
predefined variable
control structure
19. To determine the amount of elements in an array
$var++ and $var
associative array
count()
ASP
20. container of ordered data elements
POST
Array
floor()
$var++ and $var
21. To iterate over the values of an array
the dollar sign $
for ($i = 0; $i < count($array); $i++) {statement(s);}
html_entity_decode()
predefined variable
22. Used to create a substring (referred to as a token) from a larger string
GET
Array
array_merge()
strtok()
23. Define(NAME,value)
control structure
E_STRICT
decimal
Constant
24. Variable names can begin with __________
underscores
preg_replace()
curly braces; ${$total}
parentheses
25. equivalence
foreach loop
unset()
==
open source
26. To counter htmlentities()
asort()
error_reporting (E_ALL)
html_entity_decode()
the dollar sign $
27. Use ______ when there are no variables in the string
single quotes
$_POST[]
null
<?php
28. Creates a pointer to a file with the declared mode (read - write -etc.).
negative numbers
substr_count()
asort()
fopen()
29. TRUE or FALSE
number_format()
underscores
include() and require()
boolean
30. print $_SERVER will _____ work if you use the print function on arrays.
$array[] = item
not
$varname[key]
preg_replace()
31. Function can you use to format a number with commas
number_format()
SGML
define()
single quotes
32. either hasn't yet been set or is assigned NULL value
$_GET[]
null
sql
parentheses
33. Returns a character from a specified ASCII value
>>
chr()
control structure
error_reporting (E_ALL | E_STRICT)
34. To sort the values while maintaining the correlation between each value and its key
asort()
count()
Parse error
statement
35. Use ________ to have multiple quotations in one string
$var++ and $var
strlen()
the escape character ''
urlencode()
36. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
nl2br()
<<
sort()
function
37. Function that contains the highest value that rand() can have randomly
general
getrandmax()
XML
error_reporting (E_ALL & -E_NOTICE)
38. The four main error types are:Notice - Warning - ________ and Error.
int
Parse error
addcslashes()
str_ireplace()
39. Used to replace a substring with another string - it is not case-sensitive.
error_reporting (0)
POST
defined()
str_ireplace()
40. To word wrap after a certain amount of characters.
client-side programing
if/elseif/else and switch statements
wordwrap()
$array[] = item
41. searches the subject for matches to a given pattern replaced with the given replacement text
0
$_SESSION[]
preg_replace()
fopen()
42. This error refers to a variable with no value.
chop()
$_POST[]
isset()
Notice
43. The syntax for connecting to a database
loops
negative numbers
$dbc = mysql_connect(hostname, username, password)
switch
44. ____ or key is referred to for a value within an array.
index
XML
str_word_count()
switch
45. To reorganise the array randomly
preg_split()
array
shuffle()
array()
46. To iterate over the keys and values of an array
boolean
foreach loop
SGML
the dollar sign $
47. Used to encrypt values - it is a one-way encryption method
E_STRICT
function error_reporting()
crypt()
boolean
48. a line of information that can be stored in a variable or used in a function or statement
+
wordwrap()
string
double quotes
49. The output of var_export((float)array(0));
1
define()
Hex
list()
50. To set up error reporting
htmlentities()
str_word_count()
single quotes
function error_reporting()