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 close a connection between a database
XOR
Constant
loops
mysql_close($dbc)
2. To sort values of an array without regard to the keys
HTML
sort()
Hex
Notice
3. To assign keys to the values in an array
list()
>>
array()
not
4. Used to check if a variable has a valid numerical value; strings with numerical values pass.
is_numeric()
predefined
negative numbers
+= or -= or *= or /=
5. $_POST and $_GET are ________ variables.
list()
mysql
predefined
curly braces
6. To get time data
date()
Array
preg_split()
sort()
7. a type with two possible values: true and false
boolean
<<
preg_split()
statement
8. Function that contains the highest value that rand() can have randomly
preg_replace()
getrandmax()
mysql_fetch_object()
nl2br()
9. signed integer
rsort()
string
int
addslashes()
10. What You See Is What You Get
substr_count()
include() and require()
html_entity_decode()
WYSIWYG
11. To remove all HTML and PHP tags.
number_format()
strip_tags()
float
variable
12. allows you to split strings based on more complex rules
+
fopen()
preg_split()
mysql_close($dbc)
13. bitwise left shift
DTD
null
number_format()
<<
14. either hasn't yet been set or is assigned NULL value
null
the period; .
ceil()
open source
15. To word wrap after a certain amount of characters.
unset()
wordwrap()
==
numbers
16. A conditional or loop is a ________________.
precedence
control structure
ksort()
string
17. container of both data and code
wordwrap()
mysql
associative array
Object
18. To iterate over the keys and values of an array
foreach loop
integer
$_SESSION[]
SEO
19. EXtensible Markup Language
$_REQUEST
isset()
drop
XML
20. The four main error types are:Notice - Warning - ________ and Error.
$_POST[]
Parse error
count()
$_SESSION[]
21. _______ is a comparison operator
null
general
!= inequality
sort()
22. This error refers to a variable with no value.
function error_reporting()
define()
decimal
Notice
23. $_SERVER is a ________ variable.
mysql
DTD
predefined
GET
24. Asynchronous Javascript And XML
==
general
switch
AJAX
25. To find how many substrings are in a string
mysql_fetch_object()
substr_count()
include() and require()
empty()
26. An array of variables passed with <input /> data
arsort()
$_POST[]
GET
statement
27. The prefix for a dynamic variable - also known as a variable variable
float
$$
double quotes
$array[] = item
28. signed floating-point value
count()
float
predefined
strip_tags()
29. Used to find the length of a string
mysql
strlen()
$_GET[]
preg_split()
30. leading zero: 0100 or 0567
octal
shuffle()
associative array
precedence
31. addition
sql
+
bin2hex()
PHP
32. Uses two arguments: constant name and constant definition
define()
$_POST[]
?>
ASP
33. Search Engine Optimization
SEO
nl2br()
include() and require()
defined()
34. identity
Parse error
$var++ and $var
===
>>
35. Document Type Definitions
empty()
sql
DTD
if/elseif/else and switch statements
36. To sort the values while maintaining the correlation between each value and its key
asort()
integer
array()
nl2br()
37. Control structures that break exit
ini_set ('display_errors', 1)
define()
server-side programing
if/elseif/else and switch statements
38. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
array()
trim()
general
===
39. The syntax for connecting to a database
$dbc = mysql_connect(hostname, username, password)
ceil()
Notice
$var++ and $var
40. This fatal error arises from memory allocation problem.
+
$_POST[]
decimal
Error
41. equivalence
==
>>
!= inequality
for ($i = 0; $i < count($array); $i++) {statement(s);}
42. Function used to convert new lines in a variable from a form to <br /> tags so that the data can be formatted correctly.
string
boolean
nl2br()
curly braces; ${$total}
43. used to round numeric values.
double quotes
Shebang
round() Function
curly braces
44. bitwise XOR
$_SESSION[]
PHP
^
mysql_close($dbc)
45. To merge arrays
array_merge()
define()
strtok()
int
46. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
predefined variable
POST
array()
1
47. To check if a constant is already declared
html_entity_decode()
defined()
str_ireplace()
octal
48. Tag to begin a php script
drop
<?php
count()
defined()
49. To sort by the keys while maintaining the correlation between the key and its value
ksort()
preg_replace()
true
WYSIWYG
50. Variable names cannot begin with _______
==
Constant
.=
numbers