Pass the Zend Zend Certification 200-530 Questions and answers with CertsForce

Viewing page 1 out of 8 pages
Viewing questions 1-10 out of questions
Questions # 1:

You want to parse a URL into its single parts. Which function do you choose?

Options:

A.

parse_url()


B.

url_parse()


C.

get_url_parts()


D.

geturlparts()


Questions # 2:

Which of the listed changes would you make to the following PHP 4 code in order to make it most compliant with PHP 5? (Choose 2)

<?php

class Car {

var $model;

function Car($model) {

$this->model = $model;

} function toString() {

return "I drive a $this->model.";

}}

$c = new Car('Dodge');

echo $c->toString();

?>

Options:

A.

Change var to public or private


B.

Change function Car to function_construct


C.

Change "I drive a $this->model." to "I drive a {$this->model}."


D.

Change function toString()to static function toString()


Questions # 3:

You'd like to use the class MyDBConnection that's defined in the MyGreatFrarnework\GreafDatabaseAbstractionLayer namespace, but you want to minimize *as much as possible* the length of the class name you have to type. What would you do?

Options:

A.

Import the MyGreatFramework namespace


B.

Import the MyGreatFrarnework\GreafDatabaseAbstractionLayer namespace


C.

Alias MyGreatFrarnework\GreafDatabaseAbstractionLayer\MyDBConnection to a shorter name


D.

Alias MyGreatFrarnework\GreafDatabaseAbstractionLayer to a shorter name


Questions # 4:

What is the output of the following code?

echo 0x33, ' monkeys sit on ', 011, ' trees.';

Options:

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.


Questions # 5:

You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call:

strcasecmp('hello my dear!', 'Hello my DEAR!');

The function call returns "0". What does that mean?

Options:

A.

String 1 is less than string 2.


B.

The strings are considered equal.


C.

String 2 is less than string 1.


D.

The strings have equal length.


Questions # 6:

How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml?

One

Two

Options:

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']


Questions # 7:

What will the following code print?

echo addslashes('I am a small "HTML" string, which is

\'invalid\'.');

Options:

A.

I am a small "HTML" string, which is 'invalid'.


B.

I am a small \"HTML\" string, which is \'invalid\'.


C.

I am a small \"HTML\" string, which is \\'invalid\\'.


D.

I am a small \"HTML\" string, which is \\\'invalid\\\'.


E.

I am a \small\<\/b\> "HTML" string, which is 'invalid'\<\/u\>.


Questions # 8:

Which of the following XML declarations is NOT valid?

Options:

A.


B.


C.


D.


Questions # 9:

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

Options:

A.

1


B.

3


C.

5


D.

20


E.

7


Questions # 10:

The purpose of the singleton pattern is to...

Options:

A.

...create applications that only a single user may use.


B.

...have just one single instance of an object in the entire application.


C.

...have only one instance of each object in a collection of objects.


Viewing page 1 out of 8 pages
Viewing questions 1-10 out of questions