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. Uses two arguments: constant name and constant definition
Warning
index
$varname[key]
define()
2. bitwise XOR
addcslashes()
drop
htmlspecialchars()
^
3. Converts a string of ASCII characters to hexadecimal values
decimal
str_word_count()
bin2hex()
open source
4. Returns a string with backslashes in front of the specified characters
$array[] = item
control structure
addcslashes()
negative numbers
5. To remove all HTML and PHP tags.
open source
Parse error
strip_tags()
echo
6. The syntax for connecting to a database
addslashes()
Constant
boolean
$dbc = mysql_connect(hostname, username, password)
7. print $_SERVER will _____ work if you use the print function on arrays.
mysql
boolean
===
not
8. Function that contains the highest value that rand() can have randomly
Parse error
getrandmax()
!= inequality
variable
9. 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.
sort()
predefined
error_reporting (E_ALL | E_STRICT)
client-side programing
10. searches the subject for matches to a given pattern replaced with the given replacement text
HTML
preg_replace()
empty()
chop()
11. Leading 0x: 0x13F or 0xA23
PHP
error_reporting (E_ALL)
abs()
Hex
12. either hasn't yet been set or is assigned NULL value
addslashes()
sort()
echo
null
13. This will show all error reporting.
<?php
abs()
error_reporting (E_ALL)
index
14. To reorganise the array randomly
shuffle()
double quotes
reassign
boolean
15. Used to check if a variable has a valid numerical value; strings with numerical values pass.
parentheses
is_numeric()
bin2hex()
ceil()
16. An array whose keys are strings; also known as a hash.
boolean
associative array
?>
foreach
17. container of both data and code
str_word_count()
Object
mysql_fetch_array()
Notice
18. a language in which to make querys to a database with
ini_set ('display_errors', 1)
preg_replace()
HTTP
sql
19. signed integer
int
count()
POST
E_STRICT
20. To merge arrays
array_merge()
===
$dbc = mysql_connect(hostname, username, password)
trim()
21. a line of information that can be stored in a variable or used in a function or statement
integer
preg_replace()
string
>>
22. Online applications and resources which are available to the general public with very few restrictions
open source
octal
negative numbers
parentheses
23. Used to find the length of a string
htmlspecialchars()
Hex
preg_split()
strlen()
24. To reset an array _______ the array() function to the array
octal
server-side programing
predefined
reassign
25. Returns a character from a specified ASCII value
not
function error_reporting()
chr()
date()
26. To get time data
floor()
indexed array
date()
mysql
27. When used the value can be passed safely through the URL (GET).
$_REQUEST
urlencode()
strip_tags()
Error
28. To sort values of an array without regard to the keys
Constant
str_word_count()
sort()
Warning
29. An array of variables passed in the URL
fopen()
$_GET[]
getrandmax()
nl2br()
30. any programing language where the user must support the language the script is written in
indexed array
client-side programing
+= or -= or *= or /=
>>
31. allows you to split strings based on more complex rules
Magic Constant
index
preg_split()
count()
32. To word wrap after a certain amount of characters.
include() and require()
wordwrap()
numbers
statement
33. a positive or negative number
wordwrap()
integer
E_STRICT
array
34. Standard Generalized Markup Language
function
indexed array
XOR
SGML
35. The array that stores variables specific to a user's visit
strtok()
$_SESSION[]
precedence
ksort()
36. Search Engine Optimization
SEO
null
array()
mysql_fetch_object()
37. says 'if' this then do this 'else' do this or 'while' this do this
preg_replace()
sql
PHP
statement
38. An array of variables passed with <input /> data
floor()
$var++ and $var
Shebang
$_POST[]
39. The output of var_export((float)array(0));
mysql_fetch_object()
1
open source
POST
40. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Magic Constant
isset()
array_merge()
open source
41. Used to encrypt values - it is a one-way encryption method
HTML
crypt()
>>
int
42. A conditional or loop is a ________________.
control structure
double quotes
bin2hex()
drop
43. Used to check if a variable has any value (including 0 or FALSE or an empty string).
urlencode()
AJAX
isset()
mysql
44. To delete a variable or an element of an array
array()
if/elseif/else and switch statements
unset()
error_reporting (E_ALL)
45. The output of var_export((float)array());
substr_count()
for ($i = 0; $i < count($array); $i++) {statement(s);}
urlencode()
0
46. To create an array
HTML
array()
crypt()
mysql_fetch_array()
47. Hyper Text Markup Language
shuffle()
octal
HTML
curly braces
48. a type with two possible values: true and false
boolean
octal
shuffle()
bin2hex()
49. returns the number of matches found by a given search string under this format...
htmlentities()
DTD
preg_match()
the escape character ''
50. ___________ can be used with substr() to count backward
negative numbers
function
$_POST[]
Array