Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

Zend-Technologies Zend PHP 5 Certification (200-500) Free Practice Test

Question 1
How can you redirect a client to another page using PHP?

Correct Answer: C
Question 2
Which of the following techniques ensures that a value submitted in a form can only be yes or no?

Correct Answer: C
Question 3
What is the output of the following script?
1 <?php
2 function fibonacci ($x1, $x2)
3 {
4 return $x1 + $x2;
5 }
6
7 $x1 = 0;
8 $x2 = 1;
9
1 0 for ($i = 0; $i < 10; $i++) {
1 1 echo fibonacci($x1, $x2) . ',';
1 2 }
1 3 ?>

Correct Answer: D
Question 4
What is the output of the following code?
$a = 3;
switch ($a) {
case 1: echo 'one'; break;
case 2: echo 'two'; break;
default: echo 'four'; break;
case 3: echo 'three'; break;
}

Correct Answer: C
Question 5
What SimpleXML function is used to parse a file?

Correct Answer: E
Question 6
In the following code, which class can be instantiated?
1 <?php
2 abstract class Graphics {
3 abstract function draw($im, $col);
4 }
5
6 abstract class Point1 extends Graphics {
7 public $x, $y;
8 function __construct($x, $y) {
9 $this->x = $x;
1 0 $this->y = $y;
1 1 }
1 2 function draw($im, $col) {
1 3 ImageSetPixel($im, $this->x, $this->y, $col);
1 4 }
1 5 }
1 6
1 7 class Point2 extends Point1 { }
1 8
1 9 abstract class Point3 extends Point2 { }
2 0 ?>

Correct Answer: B
Question 7
What is the file locking mode that should be used when writing to a file?

Correct Answer: B
Question 8
When working with the MVC paradigma, the business logic should be implemented in which of the following components?

Correct Answer: A
Question 9
Which of the following configuration directives increase the risk of remote code injection when enabled? (Choose 2)

Correct Answer: C,D
Question 10
Consider the following XML code:
< ?xml version="1.0" encoding="utf-8"?>
< books>
< book id="1">PHP 5 Power Programming</book>
< book id="2">Learning PHP 5</book>
< /books>
Which of the following SimpleXML calls print the name of the second book?
(Let $xml=simplexml_load_file("books.xml");) (Choose 2)

Correct Answer: C,E
Question 11
Which of the following superglobals does not contain data from the client?

Correct Answer: C
Question 12
Type hinting in PHP allows the identification of the following variable types: (Choose 2)

Correct Answer: C,D
Question 13
Is the following code piece E_STRICT compliant?
final class Testing {
var $test = 0;
public function tester() {
return "Tested!";
}}

Correct Answer: A
Question 14
Would the following code catch a parse error?
try {
echo $label
} catch (Exception $e) {
echo $e->getMessage();
}

Correct Answer: A
Question 15
How can a PHP extension be loaded? (Choose 2)

Correct Answer: C,D
Question 16
What does the chown() function do?

Correct Answer: D