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. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
addslashes()
str_word_count()
empty()
statement
2. All variables must begin with _________.
the dollar sign $
general
client-side programing
bin2hex()
3. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
GET
foreach loop
Magic Constant
<?php
4. container of ordered data elements
Array
preg_match()
true
mysql_fetch_array()
5. bitwise left shift
==
Object
strtok()
<<
6. To assign keys to the values in an array
array()
boolean
mysql_close($dbc)
array_merge()
7. This will show all errors that fall under E_ALL or E_STRICT - the pipe | is used for 'or' so that errors that fall under either will be shown.
?>
!= inequality
error_reporting (E_ALL | E_STRICT)
==
8. To counter htmlentities()
<?php
GET
html_entity_decode()
chr()
9. To refer to an item in an array
ksort()
WYSIWYG
$varname[key]
bin2hex()
10. collection of binary data
+
string
Constant
XOR
11. leading zero: 0100 or 0567
int
!= inequality
octal
number_format()
12. Used to replace a substring with another string - it is not case-sensitive.
str_ireplace()
$_GET[]
wordwrap()
HTML
13. Use _______ for passwords or pages that would not be bookmarked or pages that require security.
Parse error
POST
decimal
for ($i = 0; $i < count($array); $i++) {statement(s);}
14. To sort by the keys while maintaining the correlation between the key and its value
mysql_fetch_object()
array_merge()
ksort()
bin2hex()
15. bitwise XOR
asort()
^
<?php
for ($i = 0; $i < count($array); $i++) {statement(s);}
16. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
$dbc = mysql_connect(hostname, username, password)
mysql_fetch_object()
htmlentities()
predefined variable
17. Active Server Pages
preg_split()
curly braces
1
ASP
18. Uses two arguments: constant name and constant definition
defined()
str_word_count()
define()
HTML
19. Function used to find the absolute value of a number or numeric variable
abs()
underscores
E_STRICT
array_merge()
20. Used to encrypt values - it is a one-way encryption method
associative array
crypt()
predefined
mysql_close($dbc)
21. _______ is a comparison operator
curly braces; ${$total}
!= inequality
preg_split()
AJAX
22. Define(NAME,value)
Constant
Error
arsort()
function
23. Used to check if a variable has any value (including 0 or FALSE or an empty string).
$varname[key]
isset()
preg_split()
ksort()
24. This fatal error arises from memory allocation problem.
control structure
for ($i = 0; $i < count($array); $i++) {statement(s);}
Error
error_reporting (E_ALL)
25. This will show all error reporting.
>>
error_reporting (E_ALL)
date()
defined()
26. print $_SERVER will _____ work if you use the print function on arrays.
error_reporting (0)
not
html_entity_decode()
chop()
27. The concatenation assignment operator?
.=
SGML
error_reporting (E_ALL | E_STRICT)
negative numbers
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 __________.
error_reporting (0)
numbers
negative numbers
curly braces; ${$total}
29. equivalence
error_reporting (E_ALL | E_STRICT)
error_reporting (0)
==
for ($i = 0; $i < count($array); $i++) {statement(s);}
30. EXtensible Markup Language
XML
function
unset()
nl2br()
31. signed floating-point value
Notice
server-side programing
float
getrandmax()
32. Creates a pointer to a file with the declared mode (read - write -etc.).
fopen()
Warning
not
chop()
33. a database which is best supported by PHP
statement
str_ireplace()
fopen()
mysql
34. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
predefined variable
chr()
GET
shuffle()
35. Standard Generalized Markup Language
+= or -= or *= or /=
htmlspecialchars()
SGML
variable
36. Control structures that break exit
function
if/elseif/else and switch statements
sort()
statement
37. This error refers to a variable with no value.
ceil()
str_word_count()
Notice
addcslashes()
38. To iterate over the values of an array
for ($i = 0; $i < count($array); $i++) {statement(s);}
Parse error
preg_split()
&
39. Variable names can begin with __________
underscores
+
0
HTML
40. _____ is a logical operator
nl2br()
XOR
rand()
foreach
41. To merge arrays
date()
Notice
float
array_merge()
42. The array that stores variables specific to a user's visit
mysql_close($dbc)
$_SESSION[]
number_format()
Error
43. The prefix for a dynamic variable - also known as a variable variable
wordwrap()
str_word_count()
$$
numbers
44. The concatenation operator?
not
predefined variable
>>
the period; .
45. The output of var_export((float)array());
0
$_SESSION[]
Error
the escape character ''
46. PHP has two conditional: if and ______.
strtok()
getrandmax()
+= or -= or *= or /=
switch
47. a line of information that can be stored in a variable or used in a function or statement
getrandmax()
numbers
addcslashes()
string
48. Use ______ when there are no variables in the string
boolean
define()
single quotes
loops
49. To sort the values while maintaining the correlation between each value and its key - in reversed order
defined()
crypt()
arsort()
bin2hex()
50. An array of variables passed with <input /> data
Error
1
variable
$_POST[]