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. To sort values of an array in reversed order
server-side programing
associative array
rsort()
0
2. searches the subject for matches to a given pattern replaced with the given replacement text
predefined
ceil()
preg_replace()
abs()
3. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
superglobal
nl2br()
E_STRICT
foreach
4. $_POST and $_GET are ________ variables.
ini_set ('display_errors', 1)
predefined
getrandmax()
superglobal
5. Asynchronous Javascript And XML
preg_split()
AJAX
control structure
mysql_close($dbc)
6. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
$_POST[]
&
error_reporting (E_ALL & -E_NOTICE)
Parse error
7. The array that stores variables specific to a user's visit
ceil()
$_SESSION[]
define()
?>
8. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
crypt()
define()
empty()
preg_split()
9. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
sort()
client-side programing
str_ireplace()
nl2br()
10. Returns a string with backslashes in front of the specified characters
double quotes
addcslashes()
preg_match()
function
11. To check if a constant is already declared
rand()
defined()
date()
define()
12. bitwise right shift
$_SESSION[]
HTTP
strtok()
>>
13. a positive or negative number
associative array
list()
integer
error_reporting (E_ALL | E_STRICT)
14. To determine the amount of elements in an array
number_format()
ASP
server-side programing
count()
15. To refer to an item in an array
unset()
string
$varname[key]
null
16. container of ordered data elements
preg_replace()
Array
SEO
HTML
17. To close a connection between a database
preg_split()
function
wordwrap()
mysql_close($dbc)
18. Online applications and resources which are available to the general public with very few restrictions
variable
open source
0
PHP
19. used to round numeric values.
round() Function
asort()
preg_match()
getrandmax()
20. ___________ can be used with substr() to count backward
for ($i = 0; $i < count($array); $i++) {statement(s);}
negative numbers
<?php
$_SESSION[]
21. Used to find the length of a string
strlen()
client-side programing
$var++ and $var
precedence
22. The concatenation assignment operator?
.=
octal
for ($i = 0; $i < count($array); $i++) {statement(s);}
$dbc = mysql_connect(hostname, username, password)
23. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
GET
strlen()
$array[] = item
is_numeric()
24. Variable names can begin with __________
underscores
<?php
negative numbers
is_numeric()
25. Alias of rtrim()
==
function
reassign
chop()
26. Used to create a substring (referred to as a token) from a larger string
strtok()
define()
0
E_STRICT
27. To reorganise the array randomly
shuffle()
SEO
date()
?>
28. To get over quotation marks while using arrays
html_entity_decode()
E_STRICT
DTD
curly braces
29. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
foreach
if/elseif/else and switch statements
mysql_fetch_object()
variable
30. Leading 0x: 0x13F or 0xA23
parentheses
Hex
precedence
boolean
31. 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
32. The concatenation operator?
preg_split()
rand()
the period; .
POST
33. A conditional or loop is a ________________.
control structure
ksort()
echo
client-side programing
34. An array whose keys are numbers.
echo
client-side programing
indexed array
$$
35. To get time data
unset()
date()
preg_match()
E_STRICT
36. 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 __________.
mysql_fetch_object()
foreach loop
curly braces; ${$total}
predefined
37. When used the value can be passed safely through the URL (GET).
ceil()
urlencode()
!= inequality
ksort()
38. The output of var_export((float)array(0));
1
strip_tags()
general
str_word_count()
39. collection of binary data
urlencode()
integer
htmlentities()
string
40. This error refers to a variable with no value.
Notice
client-side programing
error_reporting (0)
getrandmax()
41. addition
+
define()
HTTP
error_reporting (E_ALL | E_STRICT)
42. The output of var_export((float)array());
0
single quotes
PHP
$var++ and $var
43. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
underscores
abs()
true
44. The order of operations.
precedence
HTML
arsort()
error_reporting (E_ALL)
45. A data structure that can hold a number of items of data of the same type eg. a list of names
array
XOR
true
shuffle()
46. Used to find the amount of words in a string.
abs()
include() and require()
Error
str_word_count()
47. Function that contains the highest value that rand() can have randomly
getrandmax()
$array[] = item
Notice
POST
48. _____ is a logical operator
AJAX
Object
XOR
preg_split()
49. The prefix for a dynamic variable - also known as a variable variable
<?php
1
$$
Error
50. Tag to end a php script
chop()
?>
mysql_fetch_object()
trim()