Labour Day Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: geek65

200-500 Zend PHP 5 Certification Questions and Answers

Questions 4

When working with the MVC paradigma, the business logic should be implemented in which of the following components?

Options:

A.

Model

B.

View

C.

Controller

Buy Now
Questions 5

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

Options:

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.

Buy Now
Questions 6

How many elements does the array $pieces contain after the following piece of code has been executed?

$pieces = explode("/", "///");

Options:

A.

0

B.

3

C.

4

D.

5

Buy Now
Questions 7

Which of the following statements are correct? (Choose 2)

Options:

A.

It is possible to specify more than one __autoload function

B.

__autoload receives the missing class name all lowercased

C.

__autoload is being called for missing interfaces

D.

Inside __autoload missing classes trigger __autoload

Buy Now
Questions 8

Transactions are used to:

Options:

A.

guarantee high performance

B.

secure data consistency

C.

secure access to the database

D.

reduce the database server overhead

E.

reduce code size in PHP

Buy Now
Questions 9

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

Options:

A.

dom_import_simplexml()

B.

dom_export_simplexml()

C.

simplexml_import_dom()

D.

SimpleXML2Dom()

E.

None of the above.

Buy Now
Questions 10

After running this sort, what will be the value of $b?

$a = array('_!', 'def', 0);

$b = sort($a);

Options:

A.

array(0, 'def', '_!')

B.

array('_!', 0, 'def')

C.

array('def', 0, '_!)

D.

None of the above

Buy Now
Questions 11

How can you determine if magic_quotes_gpc is enabled? (Choose 2)

Options:

A.

Use the get_magic_quotes() function.

B.

Using the get_magic_quotes_runtime() function.

C.

Use the get_magic_quotes_gpc() function.

D.

Using ini_get('magic_quotes_gpc').

E.

Using ini_get('magic_quotes').

Buy Now
Questions 12

Which of the following is an invalid DOM save method?

Options:

A.

save()

B.

saveFile()

C.

saveXML()

D.

saveHTML()

E.

saveHTMLFile()

Buy Now
Questions 13

The following form is loaded in a recent browser and submitted, with the second list element selected:

In the server-side PHP code to deal with the form data, what is the value of $_POST['list']?

Options:

A.

1

B.

2

C.

two

D.

null (since the value attribute of the list has not been set)

Buy Now
Questions 14

What is the output of the following script?

1

2 function fibonacci ($x1, $x2)

3 {

4 return $x1 + $x2;

5 }

6

7 $x1 = 0;

8 $x2 = 1;

9

10 for ($i = 0; $i < 10; $i++) {

11 echo fibonacci($x1, $x2) . ',';

12 }

13 ?>

Options:

A.

1,2,3,4,5,6,7,8,9

B.

1,2,3,4,5,6,7,8,9,10,

C.

1,2,3,5,8,13,21,34,55,89,

D.

1,1,1,1,1,1,1,1,1,1,

Buy Now
Questions 15

Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)

Options:

A.

XML-RPC

B.

SOAP

C.

WSDL

D.

UDDI

Buy Now
Questions 16

What is the name of the key pointing to the domain name in the array returned by parse_url()?

Options:

A.

domain

B.

path

C.

host

D.

2

E.

scheme

Buy Now
Questions 17

What is the output of the following code?

$a = 1;

++$a;

$a*=$a;

echo $a--;

Options:

A.

4

B.

3

C.

5

D.

0

E.

1

Buy Now
Questions 18

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

Options:

A.

in_array('key', array_keys($a))

B.

isset($a['key'])

C.

array_key_exists('key', $a)

D.

None of the above

Buy Now
Questions 19

You are creating an application that repeatedly connects to a database to retrieve order data for invoices. All data comes from the same database. In order to preserve resources, you have to ensure that only one database connection should be used at any time. The code also has to open as few new database connections as possible. Which design pattern should you use for this scenario?

Options:

A.

Adapter

B.

Factory

C.

MVC

D.

Singleton

Buy Now
Questions 20

In the function setcookie() what does the 3rd parameter specify?

Options:

A.

The name of the cookie.

B.

The expiration time of the cookie.

C.

The value of the cookie.

D.

The IP address of the cookie's client.

Buy Now
Questions 21

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

Options:

A.

String

B.

Integer

C.

Array

D.

Any class or interface type

Buy Now
Questions 22

Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?

Options:

A.

Strip all occurrences of the string script.

B.

Strip all occurrences of the string javascript.

C.

Enable magic_quotes_gpc.

D.

None of the above.

Buy Now
Questions 23

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.

Buy Now
Questions 24

What is the difference between isset() and other is_*() functions (is_alpha(), is_number(), etc.)?

Options:

A.

isset() is a function call and is_*() are not function calls

B.

is_*() are language constructs and isset() is not a language construct

C.

c) isset() is a language construct and is_*() are not language constructs

D.

d) is_*() return a value whereas isset() does not

Buy Now
Questions 25

The following code piece should print "PHP is cool", but unexpectedly, it just prints "cool". How would you correct it?

echo str_replace('PHP is a pain.', 'a pain', 'cool');

Options:

A.

str_replace('PHP is a pain.', 'cool', 'a pain');

B.

str_replace('a pain', 'cool', 'PHP is a pain.');

C.

str_replace('cool', 'a pain', 'PHP is a pain.');

Buy Now
Questions 26

What is the name of the method that can be used to provide read access to virtual properties in a class?

Options:

A.

__call()

B.

__get()

C.

__set()

D.

__wakeup()

E.

__fetch()

Buy Now
Questions 27

What is the output of the following code:

str_replace(array("Apple","Orange"), array("Orange","Apple"), "Oranges are orange and Apples are green");

Options:

A.

Apples are orange and Oranges are green

B.

Apples are orange and Apples are green

C.

Apples are apple and Oranges are green

D.

Apples are apple and Apples are green

Buy Now
Questions 28

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

Options:

A.

TRUE

B.

FALSE

Buy Now
Questions 29

Which of the following parts must a XML document have in order to be well-formed?

Options:

A.

An XML declaration

B.

A root element

C.

A specified encoding

D.

A reference to either a DTD or an XML schema definition

Buy Now
Questions 30

Which of the following statements is true?

Options:

A.

All PHP database extensions support prepared statements

B.

All PHP database extensions come with their own special helper functions to escape user data to be used in dynamic SQL queries

C.

All PHP database extensions provide an OOP interface

D.

All PHP database extensions appear in the output of php -m , if installed

Buy Now
Questions 31

Under which circumstances is the $_SESSION super-global available? (Choose 2)

Options:

A.

If session_start() was called.

B.

If session.auto_start INI setting is enabled.

C.

Always available in PHP 5.

D.

If a valid session id is passed via GET, POST or COOKIE.

E.

If register_globals are enabled.

Buy Now
Questions 32

How can XML parsing errors be suppressed in the SimpleXML extension?

Options:

A.

error_reporting(E_ALL^E_NOTICE);

B.

simplexml_disable_errors(TRUE);

C.

simplexml_ignore_errors(TRUE);

D.

libxml_use_internal_errors(TRUE);

E.

simplexml_load_file("file.xml", LIBXML_NOERROR);

Buy Now
Exam Code: 200-500
Exam Name: Zend PHP 5 Certification
Last Update: May 4, 2024
Questions: 219
200-500 pdf

200-500 PDF

$28  $80
200-500 Engine

200-500 Testing Engine

$33.25  $95
200-500 PDF + Engine

200-500 PDF + Testing Engine

$45.5  $130