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. Used to display errors in a particular script - should be placed at top of script.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
2. To refer to an item in an array
preg_match()
$varname[key]
predefined
the period; .
3. Function used to round down to the lowest integer
function error_reporting()
floor()
sort()
===
4. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
predefined variable
error_reporting (0)
urlencode()
5. _____ is a logical operator
trim()
substr_count()
XOR
drop
6. The syntax for connecting to a database
rsort()
$dbc = mysql_connect(hostname, username, password)
reassign
loops
7. To check if a constant is already declared
>>
substr_count()
octal
defined()
8. _______ is a comparison operator
float
!= inequality
drop
error_reporting (E_ALL)
9. $_SERVER is a ________ variable.
Warning
predefined
Object
general
10. Leading 0x: 0x13F or 0xA23
not
AJAX
htmlspecialchars()
Hex
11. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
preg_replace()
$array[] = item
trim()
12. Function can you use to format a number with commas
array
error_reporting (0)
number_format()
addcslashes()
13. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
double quotes
nl2br()
foreach
number_format()
14. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
POST
str_ireplace()
addslashes()
15. returns the number of matches found by a given search string under this format...
Hex
fopen()
preg_match()
predefined
16. Define(NAME,value)
Constant
error_reporting (E_ALL | E_STRICT)
define()
abs()
17. used to round numeric values.
error_reporting (E_ALL | E_STRICT)
control structure
the escape character ''
round() Function
18. _________ can be used in conditional statements to set precedence
parentheses
&
ksort()
not
19. Converts a string of ASCII characters to hexadecimal values
open source
bin2hex()
preg_split()
htmlentities()
20. To reorganise the array randomly
shuffle()
nl2br()
control structure
+
21. This fatal error arises from memory allocation problem.
define()
Hex
Error
ceil()
22. EXtensible Markup Language
round() Function
XML
$_POST[]
drop
23. bitwise XOR
empty()
shuffle()
^
GET
24. 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 __________.
<?php
SEO
octal
curly braces; ${$total}
25. Alias of rtrim()
Warning
count()
chop()
unset()
26. Document Type Definitions
DTD
the dollar sign $
nl2br()
Hex
27. searches the subject for matches to a given pattern replaced with the given replacement text
===
list()
preg_replace()
double quotes
28. This error refers to a variable with no value.
Notice
date()
rsort()
if/elseif/else and switch statements
29. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
floor()
switch
unset()
30. container of both data and code
single quotes
Object
count()
bin2hex()
31. To sort the values while maintaining the correlation between each value and its key
asort()
error_reporting (E_ALL | E_STRICT)
1
not
32. To set up error reporting
E_STRICT
strlen()
function error_reporting()
loops
33. 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.
error_reporting (E_ALL | E_STRICT)
==
string
server-side programing
34. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
date()
Parse error
array()
error_reporting (0)
35. Use ______ when a variable contains any amount of variables; in general.
Shebang
.=
double quotes
Array
36. leading zero: 0100 or 0567
string
$$
$_POST[]
octal
37. To remove all HTML and PHP tags.
variable
strip_tags()
$_POST[]
predefined
38. The output of var_export((float)array());
0
drop
getrandmax()
Error
39. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
GET
HTML
PHP
wordwrap()
40. a storage location in the computer's memory that has a type & a name and a contents
define()
switch
curly braces
variable
41. An array of variables passed in the URL
null
string
$_GET[]
integer
42. signed integer
predefined
define()
int
.=
43. To declare a constant
define()
count()
strlen()
array
44. The three types of loops in PHP are: for - while - ____.
foreach
chop()
define()
error_reporting (E_ALL & -E_NOTICE)
45. This will show all error reporting.
Shebang
open source
error_reporting (E_ALL | E_STRICT)
error_reporting (E_ALL)
46. signed floating-point value
float
decimal
mysql
chop()
47. To determine the amount of elements in an array
number_format()
count()
$array[] = item
double quotes
48. Hyper Text Markup Language
mysql_fetch_object()
error_reporting (E_ALL | E_STRICT)
HTML
getrandmax()
49. function Function used to create a random number
double quotes
count()
html_entity_decode()
rand()
50. Uses two arguments: constant name and constant definition
preg_split()
define()
error_reporting (E_ALL & -E_NOTICE)
Constant