Pass4itsure > Zend > Zend Certifications > 200-550 > 200-550 Online Practice Questions and Answers

200-550 Online Practice Questions and Answers

Questions 4

Which of the following code snippets DO NOT write the exact content of the file "source.txt" to "target.txt"? (Choose 2)

A. file_put_contents("target.txt", fopen("source.txt", "r"));

B. file_put_contents("target.txt", readfile("source.txt"));

C. file_put_contents("target.txt", join(file("source.txt"), "\n"));

D. file_put_contents("target.txt", file_get_contents("source.txt"));

E. $handle = fopen("target.txt", "w+"); fwrite($handle, file_get_contents("source.txt")); fclose($handle);

Buy Now
Questions 5

Given the following DateTime objects, what can you use to compare the two dates and indicate that

$date2 is the later of the two dates?

$date1 = new DateTime('2014-02-03');

$date2 = new DateTime('2014-03-02');

A. $date2 > $date1

B. $date2 < $date1

C. $date1->diff($date2) < 0

D. $date1->diff($date2) > 0

Buy Now
Questions 6

Consider the following code. What can be said about the call to file_get_contents?

$getdata = "foo=bar";

$opts = array('http' =>

array(

'method' => 'POST',

'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $getdata

)

);

$context = stream_context_create($opts);

$result = file_get_contents('http://example.com/submit.php', false, $context);

A. A GET request will be performed on http://example.com/submit.php

B. A POST request will be performed on http://example.com/submit.php

C. An error will be displayed

Buy Now
Questions 7

What is the output of the following code?

class A {

public $a = 1;

public function __construct($a) { $this->a = $a; }

public function mul() {

return function($x) {

return $this->a*$x;

};

}

}

$a = new A(2);

$a->mul = function($x) {

return $x*$x;

};

$m = $a->mul();

echo $m(3);

A. 9

B. 6

C. 0

D. 3

Buy Now
Questions 8

Which of the following functions are used to escape data within the context of HTML? (Choose 2)

A. htmlentities()

B. addslashes()

C. stripslashes()

D. strip_tags()

E. htmlspecialchars()

Buy Now
Questions 9

When a browser requests an image identified by an img tag, it never sends a Cookie header.

A. TRUE

B. FALSE

Buy Now
Questions 10

Which of the following can be registered as entry points with a SoapServer instance (choose 2):

A. A single function

B. A single method from a class

C. All methods from a class

D. All classes defined in a script

Buy Now
Questions 11

Which sentence describes the following regular expression match? preg_match('/^\d+(?:\.[0-9]+)?$/', $test);

A. It matches float numbers with thousand seperators.

B. It matches float numbers without thousand seperators.

C. It matches binary integer numbers.

D. It matches any string.

E. It does not match anything

Buy Now
Questions 12

Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?

A. $_GET['ALL']

B. $_SERVER['QUERY']

C. $_SERVER['QUERY_STRING']

D. $_ENV['QUERY']

E. $QUERY_STRING

Buy Now
Questions 13

Which PHP function sets a cookie whose value does not get URL encoded when sending it to the

browser?

Buy Now
Exam Code: 200-550
Exam Name: Zend Certified PHP Engineer
Last Update: Jan 01, 2025
Questions: 223
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99