Limited Sale 30% Off - Ends in 48:00:00

Zend 200-550 Exam Practice Test Questions, Zend 200-550 Practice Test Questions

Pass your next exam with Exam-Labs VCE files and 100% free questions for 200-550 Zend Framework 2. Questions formatted with comments for Zend 200-550 exam practice test questions along with study guide and training courses. Pass using VCE formtatted files for Zend 200-550 practice test questions and answers.

Verified by experts
200-550 Questions & Answers

200-550 PREMIUM File

  • Guaranteed to have Latest Exam Questions
  • 100% Accurate & Verified Answers
  • Fast Free Updates to Cover Latest Pool of Questions
  • Instant Download
  • 98.4% Pass Rate
$85.70
$59.99

Download Free Zend 200-550 Exam Questions, Zend 200-550 Practice Test Questions

File Name Size Downloads  
File Name
zend.train4sure.200-550.v2021-08-24.by.gracie.123q.vce
Size
122 KB
Downloads
58
Download
File Name
zend.certkey.200-550.v2021-04-12.by.niamh.123q.vce
Size
122 KB
Downloads
211
Download

Zend 200-550 Exam Practice Test Questions, Study Guide and Training Courses in VCE File Format Which Can be Opened with Avanset VCE Player. Zend 200-550 Practice Test Questions & Answers to Help You Prepare Easily.

Questions & Answers for Zend 200-550

Showing 1-100 of 223 Questions

Question #1

Which of the following is NOT a requirement for file uploads to work?

A. The PHP directive file_uploads must be set to On
B. The form's method attribute must be set to "post"
C. The form must include a hidden input element with the name set to "MAX_FILE_SIZE"
D. The form's enctype attribute must be set to "multipart/form-data"

Comments for Question #1 (3)

August 16, 2018, 09:49 AM
C. The form must include a hidden input element with the name set to "MAX_FILE_SIZE"
August 22, 2017, 01:10 PM
The form must include a hidden input element with the name set to "MAX_FILE_SIZE"
August 22, 2017, 01:09 PM
C. The form must include a hidden input element with the name set to "MAX_FILE_SIZE"

Question #2

What would be the output of the following code?
namespace MyFramework\DB;
class MyClass {
static function myName() {
return __METHOD__;
print MyClass::myName();

A. MyFramework\DB\myName
B. MyFramework\DB\MyClass\myName
C. MyFramework\DB\MyClass::myName
D. MyClass::myName

Comments for Question #2 (3)

April 4, 2018, 09:33 PM
missing } after return __METHOD__;
August 22, 2017, 01:09 PM
MyFramework\DB\MyClass::myName
July 8, 2017, 04:21 PM
Code is written as: namespace MyFramework\DB; class MyClass { static function myName() { return __METHOD__; print MyClass::myName(); its missing the closing braces: namespace MyFramework\DB; class MyClass { static function myName() { return __METHOD__; } } print MyClass::myName();

Question #3

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

Comments for Question #3 (1)

April 3, 2018, 06:54 PM
file_get_contents description: string file_get_contents ( string $filename [, int $flags [, resource $context [, int $offset [, int $maxlen ]]]] ) One can define a context in which file_get_contents will be executed using stream_context_create. You can see that the later has the option of performing a POST, so the correct answer is "B. A POST request will be performed on http://example.com/submit.php".

Question #4

What is the output of the following code?
class Number {
private $v = 0;
public function __construct($v) { $this->v = $v; }
public function mul() {
return function ($x) { return $this->v * $x; };
$one = new Number(1);
$two = new Number(2);
$double = $two->mul()->bindTo($one);
echo $double(5);

Comments for Question #4 (2)

August 22, 2017, 01:31 PM
echo $double(5);
May 11, 2017, 06:41 PM
It would output a parse error!

Question #5

What is the result of the following code?
class T
const A = 42 + 1;
echo T::A;

A. 42
B. 43
C. Parse error

Comments for Question #5 (3)

August 8, 2018, 02:26 AM
Why is it C? I think the correct answer is B.
May 10, 2018, 04:24 AM
For me the output is 43 <?php class T { const A = 42 + 1; } echo T::A; ?>
August 31, 2017, 12:15 PM
There is missing "{ }". The correct answer would be B.43 ! Dump has not been well formatted (happens with OCR)

Question #6

What is the output of the following code?
function increment (&$val)
return $val + 1;
$a = 1;
echo increment ($a);
echo increment ($a);

Comments for Question #6 (3)

September 2, 2018, 08:08 AM
Kindly explain how is the answer 22?
June 1, 2017, 08:22 AM
Where is "{" ?
May 11, 2017, 06:56 PM
This is a Parse error!

Question #7

Which is the most efficient way to determine if a key is present in an array, assuming the
array has no NULL values?

A. in_array('key', array_keys($a))
B. isset($a['key'])
C. array_key_exists('key', $a)
D. None of the above

Comments for Question #7 (2)

April 8, 2018, 10:10 AM
B and C are valid answers
August 22, 2017, 01:40 PM
array_key_exists('key', $a)

Question #8

Which PHP function is used to validate whether the contents of
$_FILES['name']['tmp_name'] have really been uploaded via HTTP?

Comments for Question #8 (1)

August 22, 2017, 01:43 PM
is_uploaded_file(), is_uploaded_file

Question #9

What can prevent PHP from being able to open a file on the hard drive (Choose 2)?

A. File system permissions
B. File is outside of open_basedir
C. File is inside the /tmp directory.
D. PHP is running in CGI mode.

Comments for Question #9 (1)

August 22, 2017, 01:46 PM
File system permissions, File is outside of open_basedir

Question #10

Which of the following statements about Reflection is correct?

A. Reflection is an extension that can be disabled
B. Reflection is a new extension present only in PHP 5.3+
C. Reflection only allows to reflect on built-in classes
D. Built-in classes can be reflected on command line using php --rc &lt;classname>

Comments for Question #10 (1)

August 22, 2017, 01:58 PM
Built-in classes can be reflected on command line using php

Question #11

Which of the following methods are available to limit the amount of resources available to
PHP through php.ini? (Choose 2)

A. Limit the amount of memory a script can consume
B. Limit the total amount of memory PHP uses on the entire server
C. Limit the maximum execution time of a script
D. Limit the maximum number of concurrent PHP processes
E. Limit the maximum number of concurrent PHP threads

Question #12

When would you use classes and when would you use namespaces?

A. Use classes to encapsulate code and represent objects, and namespaces to avoid symbol name collisions
B. Use classes for performance-sensitive code, and namespaces when readability matters more
C. Use namespaces for performance-sensitive code, and classes when readability matters more
D. Always use them; namespaces are always superior to classes

Comments for Question #12 (1)

August 22, 2017, 02:11 PM
Use classes to encapsulate code and represent objects, and namespaces to avoid symbol name collisions

Question #13

Which of the following is correct? (Choose 2)

A. A class can extend more than one class.
B. A class can implement more than one class.
C. A class can extend more than one interface.
D. A class can implement more than one interface.
E. An interface can extend more than one interface.
F. An interface can implement more than one interface.

Comments for Question #13 (1)

August 22, 2017, 02:12 PM
A class can implement more than one interface.An interface can extend more than one interface.

Question #14

The constructs for(), foreach(), and each() can all be used to iterate an object if the object...

A. implements ArrayAccess
B. implements Iterator
C. implements Iterator and ArrayAccess
D. None of the above

Comments for Question #14 (3)

September 5, 2017, 11:36 AM
^ Correction : C is correct. My excuses... To use brackets you need ArrayAccess.
August 31, 2017, 12:13 PM
False. Valid answers should be : A. implements ArrayAccess B. implements Iterator Because you can implement either one.
August 22, 2017, 02:13 PM
implements Iterator and ArrayAccess

Question #15

Which of these elements can be encapsulated by namespaces and made accessible from
the outside?

A. Only classes
B. Classes, functions and constants
C. Classes, functions, constants and variables

Comments for Question #15 (1)

August 22, 2017, 02:14 PM
Classes, functions and constants

Question #16

Which of the following expressions will evaluate to a random value from an array below?
$array = array("Sue","Mary","John","Anna");

A. array_rand($array);
B. array_rand($array, 1);
C. shuffle($array);
D. $array[array_rand($array)];
E. array_values($array, ARRAY_RANDOM);

Comments for Question #16 (1)

August 22, 2017, 02:45 PM
$array[array_rand($array)]

Question #17

Which DOMElement property provides a reference to the list of the element's children?

Question #18

Your application uses PHP to accept and process file uploads. It fails to upload a file that is
5 MB in size, although upload_max_filesize is set to "10M". Which of the following
configurations could be responsible for this outcome? (Choose 2)

A. The PHP configuration option post_max_size is set to a value that is too small
B. The web server is using an incorrect encoding as part of the HTTP response sent to the client
C. The browser uses an incorrect encoding as part of the HTTP request sent to the server
D. The hidden form field MAX_FILE_SIZE was set to a value that is too small
E. PHP cannot process file uploads larger than 4 MB

Question #19

What will be the output value of the following code?
$array = array(1,2,3);
while (list(,$v) = each($array));
var_dump(current($array));

A. bool(false)
B. int(3)
C. int(1)
D. NULL
E. Array

Question #20

What will the following code print out?
$str = '&#10004; one of the following';
echo str_replace('&#10004;', 'Check', $str);

A. Check one of the following
B. one of the following
C. &#10004; one of the following

Question #21

SimpleXML provides the ability to iterate over items in an XML document, as well as
access items within it as if they were object properties. When creating your own classes to
access data, implementing which of the following would NOT achieve this goal?

A. __toString
B. Iterator
C. __get/__set
D. ArrayAccess

Question #22

Given the following DateTime object, which sample will NOT alter the date to the value
'2014-02-15'?
$date = new DateTime('2014-03-15');

A. $date->sub(new DateInterval('P1M'));
B. $date->setDate(2014, 2, 15);
C. $date->modify('-1 month');
D. $date->diff(new DateInterval('-P1M'));

Question #23

Given a php.ini setting of
default_charset = utf-8
what will the following code print in the browser?
header('Content-Type: text/html; charset=iso-8859-1');
echo '&#9986;&#10004;&#10013;';

A. Three Unicode characters, or unreadable text, depending on the browser
B. &#9986;&#10004;&#10013;
C. A blank line due to charset mismatch

Question #24

PHP's array functions such as array_values() can be used on an object if the object...

A. implements Traversable
B. is an instance of ArrayObject
C. implements ArrayAccess
D. None of the above

Question #25

Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "id"):
id name email
------- ----------- -------------------
1 anna alpha@example.com
2 betty beta@example.org
3 clara gamma@example.net
5 sue sigma@example.info
PHP code (assume the PDO connection is correctly established):
$dsn = 'mysql:host=localhost;dbname=exam';
$user = 'username';
$pass = '********';
$pdo = new PDO($dsn, $user, $pass);
try {
$cmd = "INSERT INTO users (id, name, email) VALUES (:id, :name, :email)";
$stmt = $pdo->prepare($cmd);
$stmt->bindValue('id', 1);
$stmt->bindValue('name', 'anna');
$stmt->bindValue('email', 'alpha@example.com');
$stmt->execute();
echo "Success!";
} catch (PDOException $e) {
echo "Failure!";
throw $e;

A. The INSERT will succeed and the user will see the "Success!" message.
B. The INSERT will fail because of a primary key violation, and the user will see the "Success!" message.
C. The INSERT will fail because of a primary key violation, and the user will see a PDO warning message.
D. The INSERT will fail because of a primary key violation, and the user will see the "Failure!" message.

Question #26

What is the output of the following code?
var_dump(boolval([]));

A. bool(true)
B. bool(false)

Question #27

Consider the following table data and PHP code. What is a possible outcome?
Table data (table name "users" with primary key "id"):
id name email
------- ----------- -------------------
1 anna alpha@example.com
2 betty beta@example.org
3 clara gamma@example.net
5 sue sigma@example.info
PHP code (assume the PDO connection is correctly established):
$dsn = 'mysql:host=localhost;dbname=exam';
$user = 'username';
$pass = '********';
$pdo = new PDO($dsn, $user, $pass);
$cmd = "SELECT name, email FROM users LIMIT 1";
$stmt = $pdo->prepare($cmd);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_BOTH);
$row = $result[0];

A. The value of $row is `array(0 => 'anna', 1 => 'alpha@example.com')`.
B. The value of $row is `array('name' => 'anna', 'email' => 'alpha@example.com')`.
C. The value of $row is `array(0 => 'anna', 'name' => 'anna', 1 => 'alpha@example.com', 'email' => 'alpha@example.com')`.
D. The value of $result is `array('anna' => 'alpha@example.com')`.

Question #28

Given the following code, how can we use both traits A and B in the same class? (select all
that apply)
trait A {
public function hello() {
return "hello";
public function world() {
return "world";
trait B {
public function hello() {
return "Hello";
public function person($name) {
return ":$name";

A. Rename the A::hello() method to a different name using A::hello as helloA;
B. Use B::hello() instead of A 's version using B::hello insteadof A
C. Use B::hello() instead of A 's version using use B::hello
D. Rename the A::hello() method to a different name using A::hello renameto helloA;
E. None of the above (both can be used directly)

Question #29

Which of the following is NOT true about PHP traits? (Choose 2)

A. Multiple traits can be used by a single class.
B. A trait can implement an interface.
C. A trait can declare a private variable.
D. Traits are able to be auto-loaded.
E. Traits automatically resolve conflicts based on definition order.

Question #30

Which one of the following XML declarations is NOT valid?

A. &lt;?xml version="1.0" ?>
B. &lt;?xml version="1.1" encoding="UTF-8" ?>
C. &lt;?xml standalone="no" ?>
D. &lt;?xml standalone="1" ?>

Question #31

What is the output of the following code?
class Foo Implements ArrayAccess {
function offsetExists($k) { return true;}
function offsetGet($k) {return 'a';}
function offsetSet($k, $v) {}
function offsetUnset($k) {}
$x = new Foo();
echo array_key_exists('foo', $x)?'true':'false';

A. true
B. false

Question #32

When retrieving data from URLs, what are valid ways to make sure all file_get_contents
calls send a certain user agent string? (Choose 2)

A. $default_opts = array('http'=>array('user_agent'=>"My Cool Browser")); $default = stream_context_set_default($default_opts);
B. stream_context_set_option("user_agent", "My Cool Browser");
C. ini_set('user_agent', "My Cool Browser");
D. stream_context_set_option($context, "http", "user_agent", "My Cool Browser");

Question #33

What is the output of the following code?
function fibonacci (&$x1 = 0, &$x2 = 1)
$result = $x1 + $x2;
$x1 = $x2;
$x2 = $result;
return $result;
for ($i = 0; $i &lt; 10; $i++) {
echo fibonacci() . ',';

A. An error
B. 1,1,1,1,1,1,1,1,1,1,
C. 1,1,2,3,5,8,13,21,34,55,
D. Nothing

Question #34

Please provide the value of the $code variable in the following statement to set an HTTP
status code that signifies that the requested resource was not found.
http_response_code($code);

Question #35

Which function can NOT help prevent cross-site scripting? (Choose 2)

A. addslashes()
B. htmlentities()
C. htmlspecialchars()
D. strip_tags()
E. quotemeta()

Question #36

Which of the following is used to find all PHP files under a certain directory?

A. PHPIterator
B. RecursiveTreeIterator
C. RecursiveDirectoryIterator
D. SplTempFileObject

Question #37

What types of HTTP authentication are supported by PHP? (Choose 2)

A. Basic
B. Advanced
C. Strict
D. Digest
E. Realm

Question #38

One common security risk is exposing error messages directly in the browser. Which PHP
configuration directive can be disabled to prevent this?

A. html_display
B. error_reporting
C. display_errors
D. error_log
E. ignore_repeated_errors

Question #39

Which value will be assigned to the key 0 in this example?
$foo = array(true, '0' => false, false => true);

Question #40

In the following code, which line should be changed so it outputs the number 2:
class A {
protected $x = array(); /* A */
public function getX() { /* B */
return $this->x; /* C */
$a = new A(); /* D */
array_push($a->getX(), "one");
array_push($a->getX(), "two");
echo count($a->getX());

A. No changes needed, the code would output 2 as is
B. Line A, to: protected &$x = array();
C. Line B, to: public function &getX() {
D. Line C, to: return &$this->x;
E. Line D, to: $a =& new A();

Question #41

What is the return value of the following code: substr_compare("foobar", "bar", 3);

A. -1
B. 1
C. TRUE
D. 0
E. FALSE

Question #42

Consider the following two files. When you run test.php, what would the output look like?
test.php:
include "MyString.php";
print ",";
print strlen("Hello world!");
MyString.php:
namespace MyFramework\String;
function strlen($str)
return \strlen($str)*2; // return double the string length
print strlen("Hello world!")

A. 12,12
B. 12,24
C. 24,12
D. 24,24
E. PHP Fatal error: Cannot redeclare strlen()

Question #43

Which methods can be used to overload object properties? (Choose 2)

A. set(), get()
B. __set(), __get()
C. __put(), __receive(), __exists()
D. set(), get(), isset()
E. __isset(), __unset()

Question #44

Which of the following techniques ensures that a value submitted in a form can only be yes
or no?

A. Use a select list that only lets the user choose between yes and no .
B. Use a hidden input field that has a value of yes or no .
C. Enable the safe_mode configuration directive.
D. None of the above.

Question #45

What is the output of the following code?
$f = function () { return "hello"; };
echo gettype($f);

A. hello
B. string
C. object
D. function

Question #46

What is the output of the following code?
$a = array('a', 'b'=>'c');
echo property_exists((object) $a, 'a')?'true':'false';
echo '-';
echo property_exists((object) $a, 'b')?'true':'false';

A. false-false
B. false-true
C. true-false
D. true-true

Question #47

Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42; }
$z = new stdClass;
f($z);
var_dump($z);

A. Error: Typehints cannot be NULL
B. Error: Typehints cannot be references
C. Result is NULL
D. Result is object of type stdClass
E. Result is 42

Question #48

How can a SimpleXML object be converted to a DOM object?

A. dom_import_simplexml()
B. dom_export_simplexml()
C. simplexml_import_dom()
D. SimpleXML2Dom()
E. None of the above.

Question #49

How many elements does the $matches array contain after the following function call is
performed?
preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=201[0-9])/', '21st March 2014', $matches);

A. 1
B. 2
C. 3
D. 4

Question #50

How many elements does the array $pieces contain after the following piece of code has
been executed?
$pieces = explode("/", "///");

A. 0
B. 3
C. 4
D. 5

Question #51

Which SPL class implements fixed-size storage?

Question #52

Under what condition may HTTP headers be set from PHP if there is content echoed prior
to the header function being used?

A. headers_sent() returns true
B. Output buffering is enabled
C. The client supports local buffering
D. The webserver uses preemptive mode

Question #53

Type hinting in PHP allows the identification of the following variable types: (Choose 2)

A. String
B. Integer
C. Array
D. Any class or interface type
E. All of the above

Question #54

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;

A. one
B. two
C. three
D. four

Question #55

Which of the following will set a 10 seconds read timeout for a stream?

A. ini_set("default_socket_timeout", 10);
B. stream_read_timeout($stream, 10);
C. Specify the timeout as the 5th parameter to the fsockopen() function used to open a stream
D. stream_set_timeout($stream, 10);
E. None of the above

Question #56

Which of the following code snippets is correct? (Choose 2)

A. interface Drawable { abstract function draw(); }
B. interface Point { function getX(); function getY(); }
C. interface Line extends Point { function getX2(); function getY2(); }
D. interface Circle implements Point { function getRadius(); }

Question #57

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

Question #58

Late static binding is used in PHP to:

A. Load dynamic libraries and extensions at runtime
B. Use caller class information provided in static method call
C. Resolve undefined class names by automatically including needed files
D. Find proper method to call according to the call arguments

Question #59

What does the __FILE__ constant contain?

A. The filename of the current script.
B. The full path to the current script.
C. The URL of the request made.
D. The path to the main script.

Question #60

What is the method used to execute XPath queries in the SimpleXML extension?

A. xpathQuery()
B. xpath()
C. simpleXMLXpath()
D. query()
E. evaluate()

Question #61

What is the output of the following code?
var_dump(boolval(new StdClass()));

A. bool(true)
B. bool(false)

Question #62

What is the output of this code?
$world = 'world';
echo &lt;&lt;&lt;'TEXT'
hello $world
TEXT;

A. hello world
B. hello $world
C. PHP Parser error

Comments for Question #62 (3)

August 2, 2018, 03:23 AM
The parse error only happen if PHP version < 5.3.0 or no newline available below TEXT;. In the situation without open PHP start and new PHP version, I think the correct answer should be B.
November 3, 2017, 12:49 PM
php 5.3+ not the parse error, but below - answer C
October 25, 2017, 05:32 AM
This will output the "hello $world", not the parser error. I tried snipped, and it worked!

Question #63

What is the output of the following code?
class Bar {
private $a = 'b';
public $c = 'd';
$x = (array) new Bar();
echo array_key_exists('a', $x) ? 'true' : 'false';
echo '-';
echo array_key_exists('c', $x) ? 'true' : 'false';

A. false-false
B. false-true
C. true-false
D. true-true

Question #64

What will be the result of the following operation?
array_combine(array("A","B","C"), array(1,2,3));

A. array("A","B","C",1,2,3)
B. array(1,2,3,"A","B",C")
C. array("A"=>1,"B"=>2,"C"=>3)
D. array(1=>"A",2=>"B",3=>"C")
E. array(1,2,3)

Question #65

What is the output of the following code?
function increment ($val)
++$val;
$val = 1;
increment ($val);
echo $val;

Comments for Question #65 (1)

July 17, 2017, 01:07 PM
malformed question

Question #66

In order to create an object storage where each object would be stored only once, you may
use which of the following? (Choose 2)

A. SplFixedArray
B. SplObjectStorage
C. SplString
D. spl_object_hash
E. spl_same_object

Question #67

Which of the following is NOT possible using reflection?

A. Analysing of nearly any aspect of classes and interfaces
B. Analysing of nearly any aspect of functions
C. Adding class methods
D. Implement dynamic construction (new with variable class name)

Question #68

Which of the following is true about stream contexts? (Choose 2)

A. A context can modify or enhance the behavior of a stream
B. A context indicates what session the stream is part of
C. A context is a set of parameters and stream wrapper specific options
D. Contexts are created with new Stream_Context();

Question #69

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. Cannot be instantiated.

Question #70

What will the $array array contain at the end of this script?
function modifyArray (&$array)
foreach ($array as &$value)
$value = $value + 1;
$value = $value + 2;
$array = array (1, 2, 3);
modifyArray($array);

A. 2, 3, 4
B. 2, 3, 6
C. 4, 5, 6
D. 1, 2, 3

Question #71

Which of the following statements about PHP is false? (Choose 2)

A. A final class can be derived.
B. A final class may be instantiated.
C. A class with a final function may be derived.
D. Static functions can be final.
E. Properties can be final.

Question #72

What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;

A. "first"
B. "second"
C. an empty string
D. an error

Question #73

Which parts of the text are matched in the following regular expression?
$text = &lt;&lt;&lt;EOT
The big bang bonged under the bung.
EOT;
preg_match_all('@b.n?g@', $text, $matches);

A. bang bong bung
B. bang bonged bung
C. big bang bong bung
D. big bang bung

Question #74

What is the output of the following code?
var_dump(boolval(-1));

A. bool(true)
B. bool(false)

Question #75

Which of the following can NOT be used to send a cookie from within a PHP application?

A. header()
B. $_COOKIE
C. setcookie()
D. setrawcookie()

Question #76

Which of the following rules must every correct XML document adhere to? (Choose 2)

A. It has to be well-formed.
B. It has to be valid.
C. It has to be associated to a DTD.
D. It may only contain UTF-8 encoded characters.

Question #77

Which constant must be passed as the second argument to htmlentities() to convert single
quotes (') to HTML entities?

A. TRUE
B. FALSE
C. ENT_QUOTES
D. ENT_NOQUOTES
E. ENT_COMPAT

Question #78

How should you track errors on your production website?

A. Enabling display_errors
B. Enabling log_errors
C. Having a site-wide exception handler
D. Setting error_reporting to E_ALL & ~E_NOTICE

Question #79

Which PHP function sets a cookie and URL encodes its value when sending it to the
browser?

Question #80

Which technique should be used to speed up joins without changing their results?

A. Add indices on joined columns
B. Add a WHERE clause
C. Add a LIMIT clause
D. Use an inner join

Question #81

Your supervisor wants you to disallow PHP scripts to open remote HTTP and FTP
resources using PHP's file functions. Which php.ini setting should you change accordingly?

Question #82

The following form is loaded in a browser and submitted, with the checkbox activated:
&lt;form method="post">
&lt;input type="checkbox" name="accept" />
&lt;/form>
In the server-side PHP code to deal with the form data, what is the value of
$_POST['accept'] ?

A. accept
B. ok
C. true
D. on

Question #83

What will be the output of the following code?
$a = array(0, 1, 2 => array(3, 4));
$a[3] = array(4, 5);
echo count($a, 1);

A. 4
B. 5
C. 8
D. None of the above

Question #84

How many elements does the array $matches from the following code contain?
$str = "The cat sat on the roof of their house.";
$matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE);

A. 2
B. 3
C. 4
D. 7
E. 9

Question #85

Which of the following are NOT acceptable ways to create a secure password hash in
PHP? (Choose 2)

A. md5()
B. hash_pbkdf2()
C. password_hash()
D. crypt()
E. openssl_digest()

Question #86

What is the output of the following code?
echo 0x33, ' monkeys sit on ', 011, ' trees.';

A. 33 monkeys sit on 11 trees.
B. 51 monkeys sit on 9 trees.
C. monkeys sit on trees.
D. 0x33 monkeys sit on 011 trees.

Question #87

Which of the following superglobals does not necessarily contain data from the client?

A. $_POST
B. $_SESSION
C. $_GET
D. $_SERVER

Question #88

What is the output of the following code?
function ratio ($x1 = 10, $x2)
if (isset ($x2)) {
return $x2 / $x1;
echo ratio (0);

A. 0
B. An integer overflow error
C. A warning, because $x1 is not set
D. A warning, because $x2 is not set
E. A floating-point overflow error
F. Nothing

Comments for Question #88 (1)

May 10, 2018, 07:53 AM
For me output was Fatal error: Uncaught ArgumentCountError: Too few arguments to function ratio(), 1

Question #89

What parsing methodology is utilized by the SimpleXML extension?

A. SAX
B. DOM
C. XPath
D. Push/Pull Approach
E. Expat

Question #90

When tracking upload progress with sessions, the values of 2 INI settings are needed to
determine the key in $_SESSION of the upload progress data. What are the INI settings?
(Choose 2)

A. session.upload_progress.file
B. session.upload_progress.key
C. session.upload_progress.prefix
D. session.upload_progress.freq
E. session.upload_progress.name

Question #91

What DOM method is used to load HTML files?

A. load()
B. loadXML()
C. loadHTML()
D. loadHTMLFile()

Question #92

In a shared hosting environment, session data can be read by PHP scripts written by any
user. How can you prevent this? (Choose 2)

A. Store session data in a different location with session.save_path .
B. Store session data in a database.
C. Enable safe_mode .
D. Set session.name to something unique.

Question #93

In the following code, which classes can be instantiated?
abstract class Graphics {
abstract function draw($im, $col);
abstract class Point1 extends Graphics {
public $x, $y;
function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
function draw($im, $col) {
ImageSetPixel($im, $this->x, $this->y, $col);
class Point2 extends Point1 { }
abstract class Point3 extends Point2 { }

A. Graphics
B. Point1
C. Point2
D. Point3
E. None, the code is invalid

Question #94

How should class MyObject be defined for the following code to work properly? Assume
$array is an array and MyObject is a user-defined class.
$obj = new MyObject();
array_walk($array, $obj);

A. MyObject should extend class Closure
B. MyObject should implement interface Callable
C. MyObject should implement method __call
D. MyObject should implement method __invoke

Question #95

Which MIME type is always sent by a client if a JPEG file is uploaded via HTTP?

A. image/jpeg
B. image/jpg
C. image/pjpeg
D. Depends on the client system

Question #96

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

A. TRUE
B. FALSE

Question #97

What is the output of the following code?
echo "1" + 2 * "0x02";

A. 1
B. 3
C. 5
D. 20
E. 7

Comments for Question #97 (2)

May 10, 2018, 07:56 AM
for me answer is Notice: A non well formed numeric value encountered in E:\xampp\htdocs\test\work.php on line 2 1
May 8, 2018, 11:10 AM
Answer is 1 with Notice: A non well formed numeric value encountered in E:\xampp\htdocs\test\work.php on line 2

Question #98

How can the id attribute of the 2nd baz element from the XML string below be retrieved
from the SimpleXML object
found inside $xml?
&lt;?xml version='1.0'?>
&lt;foo>
&lt;bar>
&lt;baz id="1">One&lt;/baz>
&lt;baz id="2">Two&lt;/baz>
&lt;/bar>
&lt;/foo>

A. $xml->getElementById('2');
B. $xml->foo->bar->baz[2]['id']
C. $xml->foo->baz[2]['id']
D. $xml->foo->bar->baz[1]['id']
E. $xml->bar->baz[1]['id']

Question #99

What is "instanceof" an example of?

A. a boolean
B. an operator
C. a function
D. a language construct
E. a class magic

Question #100

Which of the following PHP functions can be used to set the HTTP response code?
(Choose 2)

A. header_add()
B. header()
C. http_set_status()
D. http_response_code()
E. http_header_set()

Pass with Zend 200-550 exam practice test questions, study guide & training course. After studying all these free questions you can be confident on Zend 200-550 practice test questions and answers from Exam-Labs. Apart from these online questions you can also study Zend 200-550 exam practice test questions and answers in VCE file format which can be opened with Avanset VCE exam simulator.

Try Our Special 30% Discount Offer for Premium 200-550 VCE File

Verified by experts
200-550 Questions & Answers

200-550 Premium File

  • Real Exam Questions
  • Last Update: Oct 9, 2021
  • 100% Accurate Answers
  • Fast Exam Update
$59.99
$85.70

Provide Your Email Address To Download VCE File

Please fill out your email address below in order to Download VCE files or view Training Courses.

img

Trusted By 1.2M IT Certification Candidates Every Month

img

VCE Files Simulate Real
exam environment

img

Instant download After Registration

Email*

Your Exam-Labs account will be associated with this email address.

Log into your Exam-Labs Account

Please Log in to download VCE file or view Training Course

Still Not Convinced?

Download 20 Sample Questions that you Will see in your
Zend 200-550 exam.

Download 20 Free Questions

or Guarantee your success by buying the full version which covers
the full latest pool of questions. (223 Questions, Last Updated on
Oct 9, 2021)

How It Works

Download Exam
Step 1. Choose Exam
on Exam-Labs
Download IT Exams Questions & Answers
Download Avanset Simulator
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates latest exam environment
Study
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!

AUTUMN SALE: 30% DISCOUNT . This is ONE TIME OFFER

You save
30%
Save
Exam-Labs Special Discount

Enter Your Email Address to Receive Your 30% Discount Code

A confirmation link will be sent to this email address to verify your login

* We value your privacy. We will not rent or sell your email address.

AUTUMN SALE: 30% DISCOUNT

You save
30%
Save
Exam-Labs Special Discount

USE DISCOUNT CODE:

A confirmation link was sent to your email.

Please check your mailbox for a message from support@exam-labs.com and follow the directions.