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 get time data
general
HTTP
$$
date()
2. To iterate over the values of an array
$_POST[]
for ($i = 0; $i < count($array); $i++) {statement(s);}
not
===
3. 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
4. Function can you use to format a number with commas
date()
number_format()
not
$_REQUEST
5. PHP has two conditional: if and ______.
switch
function
+
loops
6. allows you to split strings based on more complex rules
the dollar sign $
associative array
Object
preg_split()
7. To get over quotation marks while using arrays
curly braces
ASP
E_STRICT
$_POST[]
8. Function that contains the highest value that rand() can have randomly
mysql_close($dbc)
general
nl2br()
getrandmax()
9. Used to check if a given variable has an "empty" value - no value or 0 or FALSE.
indexed array
empty()
Hex
strlen()
10. This will not show error reporting - it will be turned off.
defined()
null
error_reporting (0)
GET
11. does a certain action when called upon
===
$var++ and $var
function
function error_reporting()
12. To reset an array _______ the array() function to the array
^
int
strlen()
reassign
13. To declare a constant
Parse error
date()
define()
double quotes
14. a language in which to make querys to a database with
$_REQUEST
sql
true
include() and require()
15. identity
===
switch
unset()
addslashes()
16. $_SERVER - $_POST - $_GET - $_COOKIE - $_SESSION - $_ENV; special arrays.
the period; .
superglobal
decimal
$var++ and $var
17. What You See Is What You Get
sort()
curly braces
WYSIWYG
bin2hex()
18. _________ can be used in conditional statements to set precedence
getrandmax()
mysql_fetch_object()
predefined variable
parentheses
19. Used to encrypt values - it is a one-way encryption method
crypt()
str_word_count()
nl2br()
$var++ and $var
20. Used to create a substring (referred to as a token) from a larger string
POST
if/elseif/else and switch statements
<<
strtok()
21. Returns a character from a specified ASCII value
Notice
chr()
trim()
count()
22. To determine the amount of elements in an array
round() Function
fopen()
count()
floor()
23. bitwise AND
<?php
$_REQUEST
double quotes
&
24. To assign keys to the values in an array
array()
$array[] = item
!= inequality
boolean
25. Alias of rtrim()
chop()
mysql_close($dbc)
if/elseif/else and switch statements
function error_reporting()
26. Used to replace a substring with another string - it is not case-sensitive.
fopen()
str_ireplace()
strtok()
server-side programing
27. leading zero: 0100 or 0567
>>
octal
array
===
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 __________.
curly braces; ${$total}
urlencode()
Array
Warning
29. bitwise XOR
^
HTTP
unset()
wordwrap()
30. any programing language where the script is parsed on the server
SEO
+
Error
server-side programing
31. Active Server Pages
SEO
nl2br()
array
ASP
32. Document Type Definitions
error_reporting (E_ALL)
addcslashes()
DTD
1
33. The ouput of var_export((bool)"NULL");
underscores
true
htmlentities()
boolean
34. Used to check if a variable has any value (including 0 or FALSE or an empty string).
define()
nl2br()
octal
isset()
35. ___________ can be used with substr() to count backward
empty()
client-side programing
$_SESSION[]
negative numbers
36. Predefined constants such as __LINE__ or __FILE__ or __FUNCTION__ or __CLASS__ and __METHOD__
Parse error
Magic Constant
isset()
Warning
37. A data structure that can hold a number of items of data of the same type eg. a list of names
$dbc = mysql_connect(hostname, username, password)
variable
Hex
array
38. Uses two arguments: constant name and constant definition
mysql
number_format()
define()
$_POST[]
39. equivalence
numbers
round() Function
==
if/elseif/else and switch statements
40. The seven main SQL (structured query language) functions are alter - create - delete - _______ - insert - select - update
true
single quotes
drop
octal
41. Control structure that continue exit - they perform specific statements for a determined number of iterations.
loops
array
$varname[key]
precedence
42. Use ________ to have multiple quotations in one string
function
decimal
substr_count()
the escape character ''
43. An array whose keys are numbers.
mysql_fetch_object()
mysql_close($dbc)
indexed array
the period; .
44. To sort the values while maintaining the correlation between each value and its key
asort()
Notice
mysql_close($dbc)
round() Function
45. Search Engine Optimization
SEO
predefined variable
the escape character ''
reassign
46. Hyper Text Transfer Protocol
empty()
HTTP
ASP
strlen()
47. Use ______ when there are no variables in the string
array()
parentheses
single quotes
arsort()
48. To refer to an element in a multidimensional array list the indices in order of _____ to more precise;
string
null
drop
general
49. Used to find the amount of words in a string.
associative array
str_word_count()
number_format()
open source
50. To sort values of an array without regard to the keys
variable
sort()
$_SESSION[]
function error_reporting()