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. Returns a string with backslashes in front of the specified characters
htmlentities()
Object
addcslashes()
preg_replace()
2. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
Magic Constant
general
string
variable
3. says 'if' this then do this 'else' do this or 'while' this do this
statement
XOR
htmlspecialchars()
Hex
4. 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 __________.
list()
htmlspecialchars()
predefined
curly braces; ${$total}
5. Hyper Text Transfer Protocol
<?php
curly braces; ${$total}
the period; .
HTTP
6. print $_SERVER will _____ work if you use the print function on arrays.
not
for ($i = 0; $i < count($array); $i++) {statement(s);}
predefined variable
server-side programing
7. Use ______ when there are no variables in the string
preg_split()
error_reporting (E_ALL)
single quotes
<<
8. either hasn't yet been set or is assigned NULL value
null
shuffle()
str_word_count()
reassign
9. Function can you use to format a number with commas
0
number_format()
define()
predefined
10. Used to create a substring (referred to as a token) from a larger string
strtok()
abs()
integer
curly braces
11. To refer to an item in an array
$varname[key]
rand()
trim()
precedence
12. To iterate over the keys and values of an array
foreach loop
integer
if/elseif/else and switch statements
$_REQUEST
13. Hypertext Preprocessor - a server-side programing language used to create webpages
sql
PHP
error_reporting (E_ALL | E_STRICT)
Notice
14. TRUE or FALSE
Object
boolean
Constant
&
15. Tag to end a php script
?>
underscores
variable
nl2br()
16. Variable names cannot begin with _______
numbers
array()
array
mysql_fetch_object()
17. Used to convert certain HTML tags into their entity versions.
htmlspecialchars()
Error
float
foreach loop
18. signed floating-point value
DTD
ASP
sort()
float
19. $_SERVER is a ________ variable.
predefined
true
double quotes
<?php
20. Used to remove any white space - spaces or newlines or tabs - from the beginning and end of a string - not the middle.
rsort()
trim()
bin2hex()
SEO
21. EXtensible Markup Language
underscores
superglobal
XML
drop
22. container of ordered data elements
string
underscores
statement
Array
23. Used to check if a variable has any value (including 0 or FALSE or an empty string).
error_reporting (E_ALL | E_STRICT)
E_STRICT
bin2hex()
isset()
24. To iterate over the values of an array
the escape character ''
for ($i = 0; $i < count($array); $i++) {statement(s);}
0
$var++ and $var
25. Used to check if a variable has a valid numerical value; strings with numerical values pass.
Object
is_numeric()
Constant
Parse error
26. The output of var_export((float)array());
0
error_reporting (E_ALL & -E_NOTICE)
$_REQUEST
octal
27. addition
+
underscores
HTTP
!= inequality
28. To sort by the keys while maintaining the correlation between the key and its value
ceil()
list()
ksort()
predefined
29. To determine the amount of elements in an array
Array
count()
mysql_fetch_object()
trim()
30. Used to find the length of a string
strlen()
abs()
Shebang
date()
31. identity
<?php
===
==
count()
32. _______ is a comparison operator
defined()
DTD
!= inequality
strip_tags()
33. A conditional or loop is a ________________.
control structure
chop()
Object
.=
34. standard notation
decimal
bin2hex()
unset()
superglobal
35. any programing language where the script is parsed on the server
server-side programing
.=
array()
superglobal
36. Asynchronous Javascript And XML
string
AJAX
Object
reassign
37. Active Server Pages
ASP
preg_replace()
array()
Parse error
38. To assign keys to the values in an array
server-side programing
number_format()
array()
$_POST[]
39. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
curly braces; ${$total}
Parse error
HTML
<<
40. To counter htmlentities()
html_entity_decode()
SEO
strip_tags()
string
41. Used to find the amount of words in a string.
!= inequality
str_word_count()
htmlspecialchars()
foreach loop
42. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
precedence
the period; .
the dollar sign $
Magic Constant
43. signed integer
unset()
chop()
addslashes()
int
44. To include files - _______ will give errors and _________ will terminate execution().
XOR
str_ireplace()
include() and require()
htmlentities()
45. The name of the #! used to designate the location of the PHP binary
Shebang
statement
.=
date()
46. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
empty()
Constant
GET
$var++ and $var
47. Control structures that break exit
0
$_SESSION[]
<?php
if/elseif/else and switch statements
48. This will not show error reporting - it will be turned off.
error_reporting (0)
rand()
$_SESSION[]
GET
49. This error refers to a variable with no value.
htmlentities()
fopen()
abs()
Notice
50. The array that stores variables specific to a user's visit
function
Warning
$_SESSION[]
$_POST[]