Zend 200-500 - Zend PHP 5 Certification Exam
Page: 2 / 44
Total 219 questions
Question #6 (Topic: Topic 1)
Which of the following filtering techniques prevents cross-site scripting (XSS)
vulnerabilities?
vulnerabilities?
A. Strip all occurrences of the string script.
B. Strip all occurrences of the string javascript.
C. Enable magic_quotes_gpc.
D. None of the above.
Answer: D
Question #7 (Topic: Topic 1)
Identify the security vulnerability in the following example:
1 <?php
2 echo "Welcome, {$_POST['name']}.";
3 ?>
1 <?php
2 echo "Welcome, {$_POST['name']}.";
3 ?>
A. SQL Injection
B. Cross-Site Scripting
C. Remote Code Injection
D. None of the above
Answer: B
Question #8 (Topic: Topic 1)
How many times will the function counter() be executed in the following code?
function counter($start, &$stop)
if ($stop > $start)
return;
} counter($start--, ++$stop);
$start = 5;
$stop = 2;
counter($start, $stop);
function counter($start, &$stop)
if ($stop > $start)
return;
} counter($start--, ++$stop);
$start = 5;
$stop = 2;
counter($start, $stop);
A. 3
B. 4
C. 5
D. 6
Answer: C
Question #9 (Topic: Topic 1)
When a class is defined as final it:
A. Can no longer be extended by other classes.
B. Means methods in the class are not over-loadable.
C. Cannot be defined as such, final is only applicable to object methods.
D. Is no longer iteratable.
Answer: A
Question #10 (Topic: Topic 1)
Which parts of the text are matched in the following regular expression?
1 <?php
2 $text = <<<EOT
3 The big bang bonged under the bung.
4 EOT;
6 preg_match_all('@b.n?g@', $text, $matches);
7 ?>
1 <?php
2 $text = <<<EOT
3 The big bang bonged under the bung.
4 EOT;
6 preg_match_all('@b.n?g@', $text, $matches);
7 ?>
A. bang bong bung
B. bang bonged bung
C. big bang bong bung
D. big bang bung
Answer: C