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
foreach loop
html_entity_decode()
ASP
mysql_close($dbc)
2. $_POST Data sent using POST found is sent to _______
octal
Parse error
predefined variable
+
3. equivalence
preg_match()
round() Function
==
the dollar sign $
4. Hypertext Preprocessor - a server-side programing language used to create webpages
double quotes
PHP
+= or -= or *= or /=
drop
5. Function used to find the absolute value of a number or numeric variable
abs()
htmlentities()
control structure
isset()
6. Used to find the length of a string
HTML
variable
GET
strlen()
7. Converts a string of ASCII characters to hexadecimal values
bin2hex()
predefined
associative array
$$
8. A conditional or loop is a ________________.
Notice
+= or -= or *= or /=
!= inequality
control structure
9. Returns a string with backslashes in front of predefined characters
array()
addslashes()
echo
octal
10. To find how many substrings are in a string
Parse error
nl2br()
substr_count()
strtok()
11. Alias of rtrim()
chop()
unset()
fopen()
empty()
12. The syntax for connecting to a database
date()
trim()
array()
$dbc = mysql_connect(hostname, username, password)
13. leading zero: 0100 or 0567
Shebang
index
octal
drop
14. Used to check if a variable has any value (including 0 or FALSE or an empty string).
negative numbers
for ($i = 0; $i < count($array); $i++) {statement(s);}
isset()
HTTP
15. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
$_REQUEST
the dollar sign $
GET
true
16. PHP has two conditional: if and ______.
mysql_fetch_object()
WYSIWYG
switch
?>
17. Online applications and resources which are available to the general public with very few restrictions
rand()
open source
PHP
===
18. function Function used to create a random number
function
E_STRICT
switch
rand()
19. Asynchronous Javascript And XML
AJAX
null
underscores
floor()
20. Function used to round down to the lowest integer
the escape character ''
XML
preg_match()
floor()
21. addition
addslashes()
===
string
+
22. Use ______ when there are no variables in the string
not
mysql_close($dbc)
preg_split()
single quotes
23. Leading 0x: 0x13F or 0xA23
addslashes()
for ($i = 0; $i < count($array); $i++) {statement(s);}
Hex
Warning
24. To sort values of an array without regard to the keys
html_entity_decode()
chop()
SGML
sort()
25. container of both data and code
Object
preg_split()
arsort()
predefined
26. Returns a character from a specified ASCII value
the escape character ''
$_REQUEST
shuffle()
chr()
27. What You See Is What You Get
Parse error
html_entity_decode()
addslashes()
WYSIWYG
28. bitwise XOR
Warning
==
Object
^
29. To get over quotation marks while using arrays
octal
null
curly braces
preg_split()
30. Used to display errors in a particular script - should be placed at top of script.
31. An array whose keys are strings; also known as a hash.
SGML
statement
for ($i = 0; $i < count($array); $i++) {statement(s);}
associative array
32. returns the number of matches found by a given search string under this format...
sql
function
preg_match()
parentheses
33. The three types of loops in PHP are: for - while - ____.
preg_match()
error_reporting (E_ALL | E_STRICT)
foreach
predefined variable
34. To sort by the keys while maintaining the correlation between the key and its value
addslashes()
curly braces
unset()
ksort()
35. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
the dollar sign $
ksort()
mysql_fetch_object()
Object
36. Used to create a substring (referred to as a token) from a larger string
Array
null
strtok()
ksort()
37. Tag to begin a php script
<<
substr_count()
?>
<?php
38. To sort the values while maintaining the correlation between each value and its key
sort()
E_STRICT
mysql_fetch_array()
asort()
39. To reset an array _______ the array() function to the array
the dollar sign $
reassign
octal
XML
40. ____ or key is referred to for a value within an array.
index
server-side programing
boolean
predefined variable
41. All variables must begin with _________.
preg_replace()
if/elseif/else and switch statements
the dollar sign $
$_POST[]
42. says 'if' this then do this 'else' do this or 'while' this do this
preg_match()
statement
negative numbers
wordwrap()
43. a database which is best supported by PHP
Magic Constant
$_GET[]
$_REQUEST
mysql
44. either hasn't yet been set or is assigned NULL value
round() Function
null
drop
ASP
45. The array that stores variables specific to a user's visit
$_SESSION[]
curly braces
?>
control structure
46. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
array
predefined
POST
drop
47. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
trim()
preg_split()
addcslashes()
html_entity_decode()
48. The output of var_export((float)array(0));
1
drop
preg_split()
decimal
49. To iterate over the values of an array
1
for ($i = 0; $i < count($array); $i++) {statement(s);}
error_reporting (E_ALL & -E_NOTICE)
string
50. Variable names can begin with __________
fopen()
underscores
superglobal
getrandmax()