Halloween Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

Zend 200-530 Zend PHP 5.3 Certification Exam Practice Test

Page: 1 / 25
Total 254 questions

Zend PHP 5.3 Certification Questions and Answers

Question 1

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

Question 2

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;

}

Options:

A.

one

B.

two

C.

three

D.

four

Question 3

How do you allow the caller to submit a variable number of arguments to a function?

Options:

A.

Using a prototype like function test(... $parameters).

B.

Using a prototype like function test() and the function func_get_args() inside the function body.

C.

Using a prototype like function test($parameters[]).

D.

Using a prototype like function test() and the function get_variable_args() inside the function body.

E.

This is not possible in PHP.

Question 4

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()

Question 5

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()

Question 6

What function can reverse the order of values in an array without the loss of key information?

Options:

A.

array_flip()

B.

array_reverse()

C.

rsort()

D.

krsort()

E.

array_multisort()

Question 7

Which of the following keywords is not new in PHP 5?

Options:

A.

implements

B.

instanceof

C.

static

D.

abstract

Question 8

How can a PHP extension be loaded? (Choose 2)

Options:

A.

ini_set("extension", "extension.so");

B.

dl("extension.so");

C.

extension_load("extension.so");

D.

extension=extension.so inside php.ini

Question 9

Consider the following code:

strspn($test, 'aeiou', 1);

The variable $test contains the string "You get certified".

What will the function call return?

Options:

A.

true

B.

false

C.

0

D.

1

E.

2

F.

3

Question 10

What will the following code piece print?

echo strtr('Apples and bananas', 'ae', 'ea')

Options:

A.

Applas end benenes

B.

Epplas end benenes

C.

Apples and bananas

D.

Applas end bananas

Question 11

What is the length of a string returned by: md5(rand(), TRUE);

Options:

A.

Depends on the value returned by rand() function

B.

32

C.

24

D.

16

E.

64

Question 12

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

Options:

A.

$_GET['ALL']

B.

$_SERVER['QUERY']

C.

$_SERVER['QUERY_STRING']

D.

$_ENV['QUERY']

E.

$QUERY_STRING

Question 13

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 # 13

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 14

How many elements does the $matches array contain after the following function call is performed?

preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/', '21st March

2006', $matches);

Options:

A.

1

B.

2

C.

3

D.

4

Question 15

Assuming UTF-8 encoding, what is the value of $count?

Question # 15

Options:

A.

false

B.

4

C.

6

D.

7

Question 16

What is the difference between "print" and "echo"?

Options:

A.

There is no difference.

B.

Print returns length of data printed and echo does not

C.

Echo returns length of the data printed and print does not

D.

Print buffers the output, while echo does not

E.

None of the above

Question 17

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

Options:

A.

addslashes()

B.

htmlentities()

C.

htmlspecialchars()

D.

strip_tags()

E.

quotemeta()

Question 18

Transitions can be used to: (Choose 2)

Options:

A.

Recover from errors in case of a power outage or a failure in the SQL connection

B.

Ensure that the data is properly formatted

C.

Ensure that either all statements are performed properly, or that none of them are.

D.

Recover from user errors

Question 19

Which elements does the array returned by the function pathinfo() contain?

Options:

A.

root, dir, file

B.

dirname, filename, fileextension

C.

dirname, basename, extensio

D.

path, file

Question 20

What tags can always be used to begin a PHP script? (Choose 2)

Options:

A.

B.

C.

<%

D.

<%php

E.