Sample test blueprint

You are here

Test Blueprint

Categories

 

Knowledge

Comprehension

Application

Analysis

Synthesis

Evaluation

Total

(percentage)

Content Outline

(number of items)

1. The student can state the purposes for various string, database, and graphics functions in PHP. (2, 3, 5, 6, 8, 9)

6

 

 

 

 

 

6

30

2. Given a line of code, the student will be able to identify parse errors. (1, 4, 7, 10)

 

 

 

4

 

 

4

20

3. The student can distinguish standard from PECL modules. (11, 12)

2

 

 

 

 

 

2

10

4. Given a programmatic situation, the student can apply a PHP function as a solution. (13, 14, 15, 16)

 

 

4

 

 

 

4

20

5. Given generic character types for regular expressions, the student can identify the function of each escape sequence. (17, 18, 19, 20)

4

 

 

 

 

 

4

20

Total

12

0

4

4

0

0

20

 

Percentage

60

 

20

20

 

 

100

 

Directions
Circle the best answer that either correctly completes each statement or correctly answers the questions.

1. Identify the line of code with a parse error.
  1. echo ‘Hello World!’;
  2. echo ‘Hello “World”!’;
  3. echo “Hello World’s!”;
  4. echo ‘Hello World’s’;
2. The purpose of strpos() is to
  1. find the first position of an array in a string
  2. find the first occurrence of a string
  3. insert a string in a specific position of a different string
  4. delete the first occurrence of a string
3. The purpose of join() is to
  1. add two variables together mathematically.
  2. join array elements with a string.
  3. concatenate to strings.
  4. merge two arrays.
4. Identify the line of code with a parse error.
  1. if(strcmp($foo, $bar)) {
  2. if strcmp($foo, $bar) {
  3. if(substr($foo, $bar)) {
  4. if(strtr($foo, $bar)) {
5. The purpose of ksort() is to
  1. sort a string starting with capital letters
  2. sort an array by values
  3. sort an array by keys
  4. reverse sort an array by keys
6. $mysqli = new mysqli(‘localhost’, ‘root’, ‘password’); will
  1. attempt to open a connection to MySQL
  2. return boolean TRUE on success
  3. produce a parse error
  4. return an array of connection information on success
6. The purpose of mysqli_autocommit() is to
  1. turn on or off auto-committing database modifications on InnoDB tables
  2. turn on or off auto-committing database modifications on MyISAM tables
  3. turn on or off auto-committing database modifications on HEAP tables
  4. commit uncommitted SQL transactions
7. Identify the line of code with a parse error.
  1. $stmt = $mysqli->prepare(“SELECT * FROM foo WHERE bar=?”);
  2. $stmt = $mysqli->prepare(‘SELECT * FROM foo WHERE bar=?’);
  3. $stmt = mysqli_prepare($link, “SELECT * FROM foo WHERE bar=?”);
  4. $stmt = mysqli->prepare(‘SELECT * FROM foo WHERE bar=?’);
8. break 3; will _________ of a current for, foreach, while, do-while, or switch structure
  1. end execution for 3 levels
  2. pause execution for 2 levels and resume at the third level
  3. pause execution for 3 seconds
  4. cause a parse error during the execution
9. The require statement
  1. requires a specific variable parameter for continued execution
  2. includes and evaluates a specific file
  3. requires an end user to enter a password
  4. will not cause a parse error on failure
10. Identify the line of code with a parse error.
  1. $i += $factor;
  2. $i *= $factor;
  3. $i #= $factor;
  4. $i |= $factor;

Directions
Each statement is either true or false. Circle True for each statement that is true and False for each statement that is false.

11. GD2 is a standard extension
  1. True
  2. False
12. mailparse is a PECL extension
  1. True
  2. False

Directions.
Write a PHP function answer to each question in the space below each question.

13. What function would most accurately compare two string passwords?
            strcmp()

14. What function would calculate the sha1 hash of a file?
            sha1_file()

15. What function would convert a string into variables?
            str_parse()

16. How would an administrator remove erroneous spaces from the end of a string?
            rtrim()

Directions
Complete each sentence with the missing PCRE character match.

17. \s represents any _________ character/digit
            whitespace

18. \W represents any __________ character/digit
            non-word

19. \d represents any _________ character/digit
            decimal

20. \w represents any __________ character/digit
            word

A unique Normanism by David: