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. identity
str_ireplace()
variable
===
$var++ and $var
2. Search Engine Optimization
superglobal
^
SEO
variable
3. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
strtok()
trim()
+= or -= or *= or /=
curly braces
4. A conditional or loop is a ________________.
strip_tags()
round() Function
control structure
rand()
5. Used to replace a substring with another string - it is not case-sensitive.
associative array
str_ireplace()
+
foreach
6. Used to find the amount of words in a string.
foreach
str_word_count()
client-side programing
1
7. Used to find the length of a string
predefined variable
float
unset()
strlen()
8. 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 __________.
curly braces; ${$total}
Array
superglobal
$$
9. PHP has two conditional: if and ______.
shuffle()
reassign
floor()
switch
10. Returns a string with backslashes in front of the specified characters
crypt()
underscores
addcslashes()
boolean
11. searches the subject for matches to a given pattern replaced with the given replacement text
mysql_fetch_array()
preg_replace()
substr_count()
predefined variable
12. ___________ can be used with substr() to count backward
negative numbers
boolean
switch
asort()
13. Used to create a substring (referred to as a token) from a larger string
strtok()
GET
1
Hex
14. This fatal error arises from memory allocation problem.
reassign
decimal
htmlspecialchars()
Error
15. An array of variables passed in the URL
$_GET[]
superglobal
array_merge()
+
16. EXtensible Markup Language
$array[] = item
XML
arsort()
addslashes()
17. A data structure that can hold a number of items of data of the same type eg. a list of names
array
arsort()
+= or -= or *= or /=
wordwrap()
18. bitwise right shift
>>
boolean
boolean
urlencode()
19. To check if a constant is already declared
htmlentities()
strlen()
precedence
defined()
20. The concatenation operator?
if/elseif/else and switch statements
mysql
string
the period; .
21. Tag to end a php script
date()
the dollar sign $
reassign
?>
22. This error refers to a variable with no value.
$dbc = mysql_connect(hostname, username, password)
Notice
function
preg_match()
23. Hyper Text Markup Language
HTML
indexed array
nl2br()
str_word_count()
24. An array whose keys are numbers.
boolean
defined()
foreach loop
indexed array
25. _______ is a comparison operator
define()
PHP
addcslashes()
!= inequality
26. Function can you use to format a number with commas
getrandmax()
trim()
number_format()
&
27. collection of binary data
crypt()
WYSIWYG
Object
string
28. 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
29. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
<?php
array()
empty()
SEO
30. returns the number of matches found by a given search string under this format...
?>
float
wordwrap()
preg_match()
31. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
Parse error
sql
POST
array()
32. bitwise AND
Parse error
mysql_fetch_object()
round() Function
&
33. Returns a character from a specified ASCII value
mysql_close($dbc)
$_REQUEST
chr()
mysql_fetch_object()
34. Active Server Pages
ASP
control structure
drop
$_GET[]
35. To sort by the keys while maintaining the correlation between the key and its value
function error_reporting()
include() and require()
HTML
ksort()
36. the most basic function in PHP used to output information to the page
AJAX
<?php
E_STRICT
echo
37. The concatenation assignment operator?
reassign
chr()
.=
strip_tags()
38. Control structures that break exit
function
>>
array_merge()
if/elseif/else and switch statements
39. Variable names can begin with __________
preg_match()
boolean
control structure
underscores
40. The ouput of var_export((bool)"NULL");
true
array
sort()
preg_match()
41. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
^
error_reporting (0)
client-side programing
42. Function used to find the absolute value of a number or numeric variable
control structure
empty()
Error
abs()
43. Used to convert all HTML tags into their entity versions.
html_entity_decode()
htmlentities()
floor()
drop
44. used to round numeric values.
general
round() Function
asort()
Constant
45. Variable names cannot begin with _______
single quotes
$var++ and $var
numbers
$_GET[]
46. a positive or negative number
integer
PHP
E_STRICT
html_entity_decode()
47. To reset an array _______ the array() function to the array
$$
reassign
include() and require()
Hex
48. To assign keys to the values in an array
$dbc = mysql_connect(hostname, username, password)
array()
PHP
function
49. Operators used to operate and assign
defined()
+= or -= or *= or /=
indexed array
variable
50. To delete a variable or an element of an array
str_word_count()
define()
trim()
unset()