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 name of the #! used to designate the location of the PHP binary
open source
Shebang
null
true
2. 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 __________.
general
curly braces; ${$total}
define()
array()
3. Returns a character from a specified ASCII value
chr()
abs()
negative numbers
variable
4. The concatenation assignment operator?
.=
arsort()
$dbc = mysql_connect(hostname, username, password)
variable
5. says 'if' this then do this 'else' do this or 'while' this do this
statement
function error_reporting()
define()
mysql_fetch_object()
6. Besides GET and POST ________ can be used to access data but $_POST and $_GET are more precise and therefore preferable.
.=
SEO
$_REQUEST
curly braces
7. Used to display errors in a particular script - should be placed at top of script.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
8. identity
1
strtok()
===
curly braces
9. Document Type Definitions
!= inequality
DTD
$_REQUEST
statement
10. To counter htmlentities()
html_entity_decode()
Parse error
numbers
count()
11. To check if a constant is already declared
addcslashes()
define()
defined()
array()
12. leading zero: 0100 or 0567
octal
double quotes
0
single quotes
13. bitwise XOR
ksort()
$_SESSION[]
^
foreach loop
14. Used to replace a substring with another string - it is not case-sensitive.
asort()
str_ireplace()
superglobal
strip_tags()
15. Active Server Pages
parentheses
array()
rsort()
ASP
16. Use ______ when a variable contains any amount of variables; in general.
define()
switch
indexed array
double quotes
17. standard notation
the dollar sign $
$var++ and $var
decimal
Parse error
18. Leading 0x: 0x13F or 0xA23
function
error_reporting (E_ALL)
Hex
Parse error
19. To assign array element values to individual variables
general
date()
list()
define()
20. To reorganise the array randomly
shuffle()
not
array()
null
21. Used to find the length of a string
bin2hex()
strlen()
double quotes
htmlspecialchars()
22. To create an array
array()
Notice
decimal
statement
23. The output of var_export((float)array(0));
Warning
DTD
1
&
24. To merge arrays
negative numbers
index
count()
array_merge()
25. allows you to split strings based on more complex rules
+
preg_split()
addslashes()
strtok()
26. Online applications and resources which are available to the general public with very few restrictions
chop()
open source
$_POST[]
predefined
27. searches the subject for matches to a given pattern replaced with the given replacement text
string
preg_replace()
GET
AJAX
28. Use ______ when there are no variables in the string
1
single quotes
PHP
statement
29. To get time data
array()
date()
HTML
+
30. To iterate over the values of an array
function error_reporting()
foreach loop
for ($i = 0; $i < count($array); $i++) {statement(s);}
sort()
31. To word wrap after a certain amount of characters.
Parse error
wordwrap()
round() Function
+
32. To assign keys to the values in an array
ceil()
Warning
HTTP
array()
33. bitwise AND
&
curly braces; ${$total}
ASP
POST
34. any programing language where the script is parsed on the server
include() and require()
array()
server-side programing
array
35. Asynchronous Javascript And XML
<<
AJAX
Error
the escape character ''
36. Returns a string with backslashes in front of the specified characters
precedence
octal
numbers
addcslashes()
37. Hyper Text Transfer Protocol
WYSIWYG
==
boolean
HTTP
38. To include files - _______ will give errors and _________ will terminate execution().
include() and require()
the period; .
$_POST[]
foreach loop
39. Creates a pointer to a file with the declared mode (read - write -etc.).
AJAX
fopen()
XOR
include() and require()
40. The seven main error reporting constants are: E_NOTICE - E_WARNING - E_PARSE - E_ERROR - E_ALL - _____ - E_DEPRECATED
E_STRICT
preg_split()
variable
rsort()
41. The ouput of var_export((bool)"NULL");
server-side programing
urlencode()
Warning
true
42. print $_SERVER will _____ work if you use the print function on arrays.
not
echo
strtok()
true
43. The three types of loops in PHP are: for - while - ____.
foreach
bin2hex()
function
the dollar sign $
44. container of both data and code
array()
isset()
Object
$var++ and $var
45. An array of variables passed with <input /> data
strtok()
boolean
rsort()
$_POST[]
46. either hasn't yet been set or is assigned NULL value
define()
null
Array
>>
47. _________ can be used in conditional statements to set precedence
open source
E_STRICT
parentheses
trim()
48. This will show all error reporting except for notice errors.
SGML
drop
$$
error_reporting (E_ALL & -E_NOTICE)
49. Used to find the amount of words in a string.
parentheses
error_reporting (E_ALL | E_STRICT)
str_word_count()
htmlentities()
50. Hyper Text Markup Language
mysql_fetch_array()
HTML
urlencode()
shuffle()