Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Zend 200-530 - Zend PHP 5.3 Certification

Page: 4 / 8
Total 254 questions

What is the output of the following script?

1

2 class a

3 {

4 public $val = 10;

5 }

6

7 function renderVal (a $a)

8 {

9 return $a->$val;

10 }

11

12 renderVal (new a);

13 ?>

A.

Nothing

B.

NULL

C.

A fatal error

D.

$val

E.

10

What is the name of the PHP function used to automatically load non-yet defined classes?

A.

Autoload()

B.

__autoload()

C.

__catch()

D.

Load()

E.

loadClass()

Which of the following function signatures is correct if you want to have classes automatically loaded?

A.

function autoload($class_name)

B.

function __autoload($class_name, $file)

C.

function __autoload($class_name)

D.

function _autoload($class_name)

E.

function autoload($class_name, $file)

What can NOT be used to send a cookie from within a PHP application?

A.

header()

B.

$_COOKE

C.

setcookie()

D.

setrawcookie()

You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the dl() function. How can you do this? (Choose 2)

A.

Set enable_dl to Off in the server's php.ini configuration file.

B.

Add dl to the current value of disable_functions in the server's php.ini configuration file.

C.

Add dl to the current value of disable_classes in the server's php.ini configuration file.

D.

Write a custom function called dl(), save it under the name prepend.inc and then set the auto_prepend_file directive to prepend.inc in php.ini.

Where does the session extension store the session data by default?

A.

SQLite Database

B.

MySQL Database

C.

Shared Memory

D.

File system

E.

Session Server

An HTML form contains this form element

When this form is submitted, the following PHP code gets executed:

move_uploaded_file(

$_FILES['myFile']['tmp_name'],

'uploads/' . $_FILES['myFile']['name']);

Which of the following actions must be taken before this code may go into production?

(Choose 2)

A.

Check with is_uploaded_file() whether the uploaded file $_FILES['myFile']['tmp_name'] is valid

B.

Sanitize the file name in $_FILES['myFile']['name'] because this value is not consistent among web browsers

C.

Check the charset encoding of the HTTP request to see whether it matches the encoding of the uploaded file

D.

Sanitize the file name in $_FILES['myFile']['name'] because this value could be forged

E.

Use $HTTP_POST_FILES instead of $_FILES to maintain upwards compatibility

You want to extract the pieces of a date string, which looks like this:

"2005-11-02". Which of the following pieces of code will properly assign $year,

$month and $day with their respective values?

A.

sscanf("2005-11-02", '%d-%d-%d', $year, $month, $day);

B.

scan("2005-11-02", '%d-%d-%d', $year, $month, $day);

C.

sscanf('%d-%d-%d', "2005-11-02", $year, $month, $day);

D.

sscan($year, $month, $date '%d-%d-%d', "2005-11-02");

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

A.

root, dir, file

B.

dirname, filename, fileextension

C.

dirname, basename, extensio

D.

path, file

What will the following function call print?

printf('%010.6f', 22);

A.

22

B.

22.00

C.

022.000000

D.

22.000000