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 merge arrays
count()
GET
SEO
array_merge()
2. To remove all HTML and PHP tags.
strip_tags()
mysql
count()
preg_match()
3. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
predefined
foreach loop
Magic Constant
1
4. To sort the values while maintaining the correlation between each value and its key - in reversed order
arsort()
$varname[key]
^
wordwrap()
5. Operators used to operate and assign
unset()
is_numeric()
+= or -= or *= or /=
bin2hex()
6. Used to convert certain HTML tags into their entity versions.
htmlspecialchars()
client-side programing
function error_reporting()
underscores
7. _________ can be used in conditional statements to set precedence
parentheses
unset()
$dbc = mysql_connect(hostname, username, password)
int
8. Hypertext Preprocessor - a server-side programing language used to create webpages
echo
PHP
define()
wordwrap()
9. This fatal error arises from memory allocation problem.
Error
decimal
associative array
&
10. Used to find the length of a string
strlen()
+= or -= or *= or /=
switch
unset()
11. Function used to round down to the lowest integer
floor()
Notice
number_format()
ASP
12. To find how many substrings are in a string
null
substr_count()
HTML
define()
13. The three types of loops in PHP are: for - while - ____.
superglobal
foreach
control structure
list()
14. This fatal fatal is caused by a semantic mistake: omission of a semicolon or imbalance of quotations or parentheses or braces.
Parse error
float
sort()
ini_set ('display_errors', 1)
15. To delete a variable or an element of an array
echo
AJAX
unset()
control structure
16. Use ______ for search engines or catalogued pages or pages that would be bookmarked.
Magic Constant
>>
GET
number_format()
17. Returns a string with backslashes in front of predefined characters
single quotes
trim()
addslashes()
error_reporting (E_ALL & -E_NOTICE)
18. Uses two arguments: constant name and constant definition
Parse error
Error
mysql
define()
19. bitwise XOR
^
$_REQUEST
for ($i = 0; $i < count($array); $i++) {statement(s);}
ksort()
20. Use ______ when there are no variables in the string
+= or -= or *= or /=
single quotes
open source
E_STRICT
21. $_SERVER is a ________ variable.
abs()
predefined
Magic Constant
html_entity_decode()
22. a database which is best supported by PHP
precedence
mysql
is_numeric()
define()
23. standard notation
predefined
<?php
preg_match()
decimal
24. says 'if' this then do this 'else' do this or 'while' this do this
mysql_close($dbc)
statement
is_numeric()
defined()
25. Document Type Definitions
boolean
predefined variable
DTD
Hex
26. To counter htmlentities()
html_entity_decode()
Error
date()
associative array
27. Returns an array that corresponds to the fetched row of MySQL data and moves the internal data pointer ahead
statement
the dollar sign $
mysql_fetch_array()
defined()
28. To close a connection between a database
boolean
define()
crypt()
mysql_close($dbc)
29. TRUE or FALSE
PHP
array()
boolean
chr()
30. The syntax for connecting to a database
.=
boolean
$dbc = mysql_connect(hostname, username, password)
float
31. Define(NAME,value)
is_numeric()
array_merge()
control structure
Constant
32. Shorthand used to increment and decrement
$var++ and $var
$_POST[]
Notice
substr_count()
33. Function that contains the highest value that rand() can have randomly
WYSIWYG
getrandmax()
sql
ASP
34. the most basic function in PHP used to output information to the page
echo
strlen()
arsort()
htmlentities()
35. Use ________ to have multiple quotations in one string
>>
the escape character ''
foreach loop
open source
36. returns the number of matches found by a given search string under this format...
preg_match()
<<
SGML
crypt()
37. To iterate over the values of an array
true
for ($i = 0; $i < count($array); $i++) {statement(s);}
superglobal
Parse error
38. Asynchronous Javascript And XML
parentheses
date()
AJAX
preg_split()
39. Used to check if a variable has a valid numerical value; strings with numerical values pass.
$dbc = mysql_connect(hostname, username, password)
is_numeric()
$_POST[]
Hex
40. allows you to split strings based on more complex rules
.=
preg_split()
octal
control structure
41. print $_SERVER will _____ work if you use the print function on arrays.
.=
not
statement
+= or -= or *= or /=
42. Tag to end a php script
arsort()
?>
sort()
the dollar sign $
43. To determine the amount of elements in an array
count()
date()
preg_match()
html_entity_decode()
44. signed floating-point value
GET
Parse error
sort()
float
45. To sort values of an array in reversed order
boolean
sort()
&
rsort()
46. Similar to mysql_fetch_array() - but cannot be accessed by integer offset
array_merge()
0
error_reporting (E_ALL)
mysql_fetch_object()
47. This will show all error reporting.
rsort()
error_reporting (E_ALL)
single quotes
XOR
48. a language in which to make querys to a database with
sql
Parse error
isset()
SGML
49. Control structure that continue exit - they perform specific statements for a determined number of iterations.
wordwrap()
for ($i = 0; $i < count($array); $i++) {statement(s);}
loops
predefined variable
50. Used to find the amount of words in a string.
Error
str_word_count()
asort()
error_reporting (E_ALL | E_STRICT)