Winter Special Flat 65% Limited Time Discount offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

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

Testing Engine

  • Product Type: Testing Engine
$42  $119.99

PDF Study Guide

  • Product Type: PDF Study Guide
$36.75  $104.99
Question 1

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.

Question 2

Which of the following may be used in conjunction with CASE inside a SWITCH statement?

Options:

A.

A scalar

B.

An expression

C.

A boolean

D.

All of the above

Question 3

Some databases support the LIMIT clause. ft is a method to ensure that

Options:

A.

only certain rows are deleted in DELETE queries.

B.

only a defined subset of rows are read in SELECT queries.

C.

only certain users can access the database.

Question 4

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

Question 5

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

Options:

A.

4

B.

5

C.

8

D.

None of the above

Question 6

What is the output of the following code?

Options:

Question 7

Which elements can be encapsulated by namespaces?

Options:

A.

Only classes

B.

Classes, functions and constants

C.

Classes, functions, constants and variables

Question 8

Which of the following can be registered as entry points with a SoapServer instance (choose 3)

Options:

A.

A single function

B.

A single method from a class

C.

Multiple functions at once

D.

All methods from a class

E.

All classes defined in a script

Question 9

PHP’s array functions such as array_values() can be used on an object is the oject….

Options:

A.

implement Traversable

B.

is an instance of ArrayObject

C.

implements ArrayAccess

D.

None of the above

Question 10

After executing a SELECT query on a database server,

Options:

A.

All data is immediately transmitted to PHP

B.

All data will be transmitted on-demand to PHP

C.

None of the above

Question 11

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.

Question 12

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

Options:

A.

implements

B.

instanceof

C.

static

D.

abstract

Question 13

When a transaction reports no affected rows, it means that: (Choose 2)

Options:

A.

The transaction failed

B.

The transaction affected no lines

C.

The transaction was rolled back

D.

The transaction was committed without error

Question 14

The following form is loaded in a browser and submitted, with the checkbox activated:

<input type="checkbox" name="accept">

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

Options:

A.

accept

B.

ok

C.

true

D.

on

Question 15

Which of the following XML declarations is NOT valid?

Options:

A.

B.

C.

D.

Question 16

What is the result of the following bitwise operation in PHP?

1 ^ 2

Options:

A.

1

B.

3

C.

2

D.

4

Question 17

You analyze the code of a colleague and see a call to the function quotemeta(). You give the string "Holy $%&[. What's going on?" as a parameter to it. What will it output?

Options:

A.

Holy $%&[. What's going on?

B.

Holy \$%&\[\. What's going on\?

C.

Holy $%&[. What\'s going on?

D.

Holy \$\%\&\[\. What\'s going on\?

Question 18

Which of the following statements are NOT true?

Options:

A.

SimpleXML allows removal of attributes.

B.

SimpleXML allows addition of new attributes.

C.

SimpleXML allows removal of nodes.

D.

SimpleXML allows addition of new nodes.

E.

None of the above

Question 19

Consider the following code. What can be said about the call to file_get_contents?

Options:

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

Question 20

What is the return value of the following code?

strpos("me myself and I", "m", 2)

Options:

A.

2

B.

3

C.

4

D.

0

E.

1

Question 21

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 22

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

Options:

A.

implements Traversable

B.

is an instance of ArrayObject

C.

implements ArrayAccess

D.

None of the above

Question 23

Which of the following data types cannot be directly manipulated by the client?

Options:

A.

Cookie Data

B.

Session Data

C.

Remote IP Address

D.

User Agent

Question 24

Assume that you are using PHP s session management without cookies and want to make sure that session information does not get lost when redirecting the client to another URL. Which of the following functions do you need to achieve that? (Choose 3)

Options:

A.

header()

B.

session_id()

C.

session_info()

D.

session_name()

E.

session_write_close()

Question 25

Which requirements need NOT be met so that file uploads work?

Options:

A.

The PHP directive file_uploads must be set to on

B.

The form's method attribute must be set to "post"

C.

Sate mode must be turned off so that the uploaded file an be written to the server

D.

The form's enctype attribute must be set to "multipart/form-data"

Question 26

You want to allow your users to submit HTML code in a form, which will then be displayed as real code and not affect your site layout. Which function do you apply to the text, when displaying it? (Choose 2)

Options:

A.

strip_tags()

B.

htmlentities()

C.

htmltidy()

D.

htmlspecialchars()

E.

showhtml()

Question 27

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

Question 28

Webservices are primarily meant to support

Options:

A.

business-to-business communication

B.

machine-to-machine interaction

C.

improved accessibility for websites

Question 29

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

Question 30

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)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 31

What is the output of the following code?

Options:

A.

false-false

B.

false-true

C.

true-false

D.

true-true

Question 32

What is "instanceof" an example of:

Options:

A.

a boolean

B.

an operator

C.

a function

D.

a language construct

E.

a class magic

Question 33

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

Options:

A.

B.

C.

<%

D.

<%php

E.