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. The prefix for a dynamic variable - also known as a variable variable
ceil()
predefined
$$
superglobal
2. the most basic function in PHP used to output information to the page
mysql_fetch_object()
echo
>>
rsort()
3. Tag to begin a php script
===
$array[] = item
<?php
parentheses
4. Variable names can begin with __________
underscores
PHP
switch
numbers
5. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
Array
associative array
E_STRICT
$_REQUEST
6. To iterate over the values of an array
Hex
statement
$array[] = item
for ($i = 0; $i < count($array); $i++) {statement(s);}
7. The concatenation operator?
boolean
getrandmax()
the period; .
mysql_fetch_object()
8. Standard Generalized Markup Language
numbers
0
define()
SGML
9. any programing language where the user must support the language the script is written in
client-side programing
0
drop
>>
10. Use ______ when there are no variables in the string
bin2hex()
fopen()
single quotes
strip_tags()
11. Used to check if a variable has any value (including 0 or FALSE or an empty string).
isset()
sort()
Constant
index
12. a storage location in the computer's memory that has a type & a name and a contents
DTD
null
Parse error
variable
13. To iterate over the keys and values of an array
crypt()
substr_count()
$_SESSION[]
foreach loop
14. either hasn't yet been set or is assigned NULL value
foreach
not
$$
null
15. Operators used to operate and assign
wordwrap()
chop()
+
+= or -= or *= or /=
16. To assign keys to the values in an array
drop
array()
crypt()
1
17. To sort the values while maintaining the correlation between each value and its key - in reversed order
parentheses
XML
arsort()
mysql
18. The four main error types are:Notice - Warning - ________ and Error.
Parse error
1
the period; .
&
19. Use ________ to have multiple quotations in one string
if/elseif/else and switch statements
the escape character ''
Array
negative numbers
20. Search Engine Optimization
$varname[key]
SEO
HTML
$var++ and $var
21. bitwise left shift
index
array()
===
<<
22. To merge arrays
XOR
server-side programing
chr()
array_merge()
23. To declare a constant
define()
array()
asort()
defined()
24. To sort values of an array without regard to the keys
sort()
WYSIWYG
$var++ and $var
switch
25. ____ or key is referred to for a value within an array.
AJAX
Warning
index
$dbc = mysql_connect(hostname, username, password)
26. To include files - _______ will give errors and _________ will terminate execution().
the escape character ''
substr_count()
HTTP
include() and require()
27. Control structure that continue exit - they perform specific statements for a determined number of iterations.
curly braces; ${$total}
preg_replace()
loops
E_STRICT
28. 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 __________.
preg_replace()
XML
!= inequality
curly braces; ${$total}
29. To find how many substrings are in a string
substr_count()
Error
int
1
30. Creates a pointer to a file with the declared mode (read - write -etc.).
!= inequality
fopen()
&
single quotes
31. a type with two possible values: true and false
Constant
chr()
decimal
boolean
32. To append elements to an array - this will assign item to the next available index; associative arrays get messy.
string
Shebang
POST
$array[] = item
33. The syntax for connecting to a database
server-side programing
HTTP
$dbc = mysql_connect(hostname, username, password)
Magic Constant
34. Alias of rtrim()
error_reporting (0)
+
chop()
$var++ and $var
35. Function can you use to format a number with commas
ini_set ('display_errors', 1)
number_format()
general
mysql
36. Leading 0x: 0x13F or 0xA23
arsort()
$_GET[]
nl2br()
Hex
37. _____ is a logical operator
ini_set ('display_errors', 1)
function
XOR
<<
38. To check if a constant is already declared
preg_replace()
===
strlen()
defined()
39. Uses two arguments: constant name and constant definition
htmlspecialchars()
define()
error_reporting (E_ALL & -E_NOTICE)
==
40. container of ordered data elements
if/elseif/else and switch statements
Array
decimal
preg_replace()
41. bitwise right shift
WYSIWYG
control structure
>>
Hex
42. To remove all HTML and PHP tags.
round() Function
error_reporting (E_ALL)
the dollar sign $
strip_tags()
43. collection of binary data
html_entity_decode()
ceil()
list()
string
44. To close a connection between a database
addslashes()
open source
count()
mysql_close($dbc)
45. To set up error reporting
function error_reporting()
echo
negative numbers
!= inequality
46. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
decimal
error_reporting (E_ALL)
trim()
mysql_fetch_object()
47. An array whose keys are strings; also known as a hash.
true
index
associative array
mysql_close($dbc)
48. Used to convert all HTML tags into their entity versions.
$array[] = item
empty()
single quotes
htmlentities()
49. does a certain action when called upon
function
mysql_fetch_array()
is_numeric()
POST
50. leading zero: 0100 or 0567
octal
precedence
Warning
&