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 find the length of a string
variable
strlen()
double quotes
==
2. collection of binary data
Warning
preg_split()
the escape character ''
string
3. _____ is a logical operator
not
associative array
XOR
control structure
4. To create an array
boolean
Error
array()
strtok()
5. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
$_POST[]
if/elseif/else and switch statements
crypt()
Parse error
6. Define(NAME,value)
drop
Constant
==
reassign
7. Use ______ when a variable contains any amount of variables; in general.
rand()
E_STRICT
XML
double quotes
8. Returns a string with backslashes in front of the specified characters
bin2hex()
1
addcslashes()
string
9. 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
10. To merge arrays
indexed array
array_merge()
boolean
str_ireplace()
11. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
AJAX
true
drop
1
12. To set up error reporting
Parse error
function error_reporting()
error_reporting (0)
addslashes()
13. Function used to round up to the highest integer
$_POST[]
ceil()
0
$array[] = item
14. _______ is a comparison operator
str_ireplace()
!= inequality
0
WYSIWYG
15. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
float
Error
Magic Constant
urlencode()
16. To sort by the keys while maintaining the correlation between the key and its value
for ($i = 0; $i < count($array); $i++) {statement(s);}
ksort()
<?php
chop()
17. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
defined()
parentheses
Magic Constant
trim()
18. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
mysql_fetch_array()
array
function
mysql_fetch_object()
19. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
E_STRICT
Constant
mysql_fetch_object()
function error_reporting()
20. An array whose keys are strings; also known as a hash.
associative array
ini_set ('display_errors', 1)
index
boolean
21. allows you to split strings based on more complex rules
defined()
ASP
preg_split()
function
22. To counter htmlentities()
round() Function
preg_split()
html_entity_decode()
Array
23. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
$array[] = item
parentheses
loops
defined()
24. Operators used to operate and assign
parentheses
+= or -= or *= or /=
PHP
!= inequality
25. To close a connection between a database
mysql_fetch_object()
htmlentities()
$_SESSION[]
mysql_close($dbc)
26. a positive or negative number
number_format()
str_ireplace()
fopen()
integer
27. An array of variables passed in the URL
mysql_fetch_array()
the dollar sign $
function
$_GET[]
28. To get over quotation marks while using arrays
sort()
boolean
curly braces
&
29. the most basic function in PHP used to output information to the page
the escape character ''
echo
rsort()
array()
30. ____ or key is referred to for a value within an array.
index
Parse error
define()
Hex
31. This error arises from misusing a function.
getrandmax()
curly braces; ${$total}
string
Warning
32. searches the subject for matches to a given pattern replaced with the given replacement text
strlen()
octal
statement
preg_replace()
33. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
switch
Constant
$_SESSION[]
34. The name of the #! used to designate the location of the PHP binary
the escape character ''
date()
Shebang
DTD
35. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
Warning
preg_match()
decimal
36. To determine the amount of elements in an array
numbers
count()
Hex
addcslashes()
37. Online applications and resources which are available to the general public with very few restrictions
str_ireplace()
$var++ and $var
open source
chop()
38. To check if a constant is already declared
is_numeric()
echo
defined()
rand()
39. Creates a pointer to a file with the declared mode (read - write -etc.).
urlencode()
str_ireplace()
$array[] = item
fopen()
40. All variables must begin with _________.
the dollar sign $
$array[] = item
!= inequality
sort()
41. To assign keys to the values in an array
the period; .
1
array()
predefined
42. signed integer
int
===
integer
the period; .
43. Converts a string of ASCII characters to hexadecimal values
preg_match()
abs()
bin2hex()
getrandmax()
44. A data structure that can hold a number of items of data of the same type eg. a list of names
array
error_reporting (E_ALL)
function
associative array
45. To include files - _______ will give errors and _________ will terminate execution().
htmlspecialchars()
include() and require()
str_ireplace()
the period; .
46. Control structure that continue exit - they perform specific statements for a determined number of iterations.
drop
$_POST[]
loops
precedence
47. The ouput of var_export((bool)"NULL");
abs()
GET
true
Constant
48. TRUE or FALSE
boolean
octal
error_reporting (E_ALL & -E_NOTICE)
str_ireplace()
49. The concatenation operator?
the period; .
array()
SEO
GET
50. To remove all HTML and PHP tags.
statement
strip_tags()
array()
Error