Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

Zend 200-530 - Zend PHP 5.3 Certification

Page: 6 / 8
Total 254 questions

What is the output of the following code?

Which PHP function is used to validate whether the contents of $_FILES['name'] ['tem_name'] have really been uploaded via HTTP'?

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

A.

$_GET['ALL']

B.

$_SERVER['QUERY']

C.

$_SERVER['QUERY_STRING']

D.

$_ENV['QUERY']

E.

$QUERY_STRING

Is the following code piece E_STRICT compliant?

final class Testing {

var $test = 0;

public function tester() {

return "Tested!";

}}

A.

Yes

B.

No

Which session function can help to avoid session fixation?

A.

session_is_registered()

B.

session_register()

C.

session_unregister()

D.

session_regenerate_id()

E.

None of the above.

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?

A.

Adapter

B.

Factory

C.

MVC

D.

Singleton

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

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

A.

accept

B.

ok

C.

true

D.

on

What is the output of the following code:

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

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

What is the ideal method of copying data between two opened files?

A.

copy($source_file, $destination_file);

B.

copy(destination_file, $source_file);

C.

stream_copy_to_stream($source_file, $destination_file);

D.

stream_copy_to_stream($destination_file, $source_file);

E.

stream_bucket_prepend($source_file, $destination_file);

Consider the following table data and PHP code. What is the outcome?

Table data (table name "users" with primary key "Id"):

PHP code (assume the PDO connection is correctly established):

A.

The database will return no rows

B.

The value of $result will be an array

C.

The value of $result will be empty

D.

The value of $result will be 'gamma@exmple.net'.