Zend 200-550 Exam Dumps, 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 dumps along with study guide and training courses. Pass using VCE formtatted files for Zend 200-550 practice test questions and 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
Download Free Zend 200-550 Exam Questions, Zend 200-550 Practice Test Questions
File Name | Size | Downloads | |
---|---|---|---|
File Name zend |
Size 122 KB |
Downloads 277 |
Download |
File Name zend |
Size 122 KB |
Downloads 430 |
Download |
Zend 200-550 Exam Dumps, 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?
Comments for Question #1 (3)
Question #2
What would be the output of the following code?
namespace MyFramework\DB;
class MyClass {
static function myName() {
return __METHOD__;
print MyClass::myName();
Comments for Question #2 (3)
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);
Comments for Question #3 (1)
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)
Question #5
What is the result of the following code?
class T
const A = 42 + 1;
echo T::A;
Comments for Question #5 (3)
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)
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?
Comments for Question #7 (2)
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)
Question #9
What can prevent PHP from being able to open a file on the hard drive (Choose 2)?
Comments for Question #9 (1)
Question #10
Which of the following statements about Reflection is correct?
Comments for Question #10 (1)
Question #11
Which of the following methods are available to limit the amount of resources available to
PHP through php.ini? (Choose 2)
Question #12
When would you use classes and when would you use namespaces?
Comments for Question #12 (1)
Question #13
Which of the following is correct? (Choose 2)
Comments for Question #13 (1)
Question #14
The constructs for(), foreach(), and each() can all be used to iterate an object if the object...
Comments for Question #14 (3)
Question #15
Which of these elements can be encapsulated by namespaces and made accessible from
the outside?
Comments for Question #15 (1)
Question #16
Which of the following expressions will evaluate to a random value from an array below?
$array = array("Sue","Mary","John","Anna");
Comments for Question #16 (1)
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)
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));
Question #20
What will the following code print out?
$str = '✔ one of the following';
echo str_replace('✔', 'Check', $str);
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?
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');
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 '✂✔✝';
Question #24
PHP's array functions such as array_values() can be used on an object if the object...
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;
Question #26
What is the output of the following code?
var_dump(boolval([]));
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];
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";
Question #29
Which of the following is NOT true about PHP traits? (Choose 2)
Question #30
Which one of the following XML declarations is NOT valid?
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';
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)
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 < 10; $i++) {
echo fibonacci() . ',';
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)
Question #36
Which of the following is used to find all PHP files under a certain directory?
Question #37
What types of HTTP authentication are supported by PHP? (Choose 2)
Question #38
One common security risk is exposing error messages directly in the browser. Which PHP
configuration directive can be disabled to prevent this?
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());
Question #41
What is the return value of the following code: substr_compare("foobar", "bar", 3);
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!")
Question #43
Which methods can be used to overload object properties? (Choose 2)
Question #44
Which of the following techniques ensures that a value submitted in a form can only be yes
or no?
Question #45
What is the output of the following code?
$f = function () { return "hello"; };
echo gettype($f);
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';
Question #47
Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42; }
$z = new stdClass;
f($z);
var_dump($z);
Question #48
How can a SimpleXML object be converted to a DOM object?
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);
Question #50
How many elements does the array $pieces contain after the following piece of code has
been executed?
$pieces = explode("/", "///");
Question #52
Under what condition may HTTP headers be set from PHP if there is content echoed prior
to the header function being used?
Question #53
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
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;
Question #55
Which of the following will set a 10 seconds read timeout for a stream?
Question #56
Which of the following code snippets is correct? (Choose 2)
Question #57
Given the default PHP configuration, how can all of the parameters provided via GET be
accessed in a form of a string?
Question #58
Late static binding is used in PHP to:
Question #59
What does the __FILE__ constant contain?
Question #60
What is the method used to execute XPath queries in the SimpleXML extension?
Question #61
What is the output of the following code?
var_dump(boolval(new StdClass()));
Question #62
What is the output of this code?
$world = 'world';
echo <<<'TEXT'
hello $world
TEXT;
Comments for Question #62 (3)
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';
Question #64
What will be the result of the following operation?
array_combine(array("A","B","C"), 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)
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)
Question #67
Which of the following is NOT possible using reflection?
Question #68
Which of the following is true about stream contexts? (Choose 2)
Question #69
When a class is defined as final it:
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);
Question #71
Which of the following statements about PHP is false? (Choose 2)
Question #72
What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;
Question #73
Which parts of the text are matched in the following regular expression?
$text = <<<EOT
The big bang bonged under the bung.
EOT;
preg_match_all('@b.n?g@', $text, $matches);
Question #74
What is the output of the following code?
var_dump(boolval(-1));
Question #75
Which of the following can NOT be used to send a cookie from within a PHP application?
Question #76
Which of the following rules must every correct XML document adhere to? (Choose 2)
Question #77
Which constant must be passed as the second argument to htmlentities() to convert single
quotes (') to HTML entities?
Question #78
How should you track errors on your production website?
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?
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:
<form method="post">
<input type="checkbox" name="accept" />
</form>
In the server-side PHP code to deal with the form data, what is the value of
$_POST['accept'] ?
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);
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);
Question #85
Which of the following are NOT acceptable ways to create a secure password hash in
PHP? (Choose 2)
Question #86
What is the output of the following code?
echo 0x33, ' monkeys sit on ', 011, ' trees.';
Question #87
Which of the following superglobals does not necessarily contain data from the client?
Question #88
What is the output of the following code?
function ratio ($x1 = 10, $x2)
if (isset ($x2)) {
return $x2 / $x1;
echo ratio (0);
Comments for Question #88 (1)
Question #89
What parsing methodology is utilized by the SimpleXML extension?
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)
Question #91
What DOM method is used to load HTML files?
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)
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 { }
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);
Question #95
Which MIME type is always sent by a client if a JPEG file is uploaded via HTTP?
Question #96
When a browser requests an image identified by an img tag, it never sends a Cookie
header.
Question #97
What is the output of the following code?
echo "1" + 2 * "0x02";
Comments for Question #97 (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?
<?xml version='1.0'?>
<foo>
<bar>
<baz id="1">One</baz>
<baz id="2">Two</baz>
</bar>
</foo>
Question #99
What is "instanceof" an example of?
Question #100
Which of the following PHP functions can be used to set the HTTP response code?
(Choose 2)
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.