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: 5 / 8
Total 254 questions

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

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.

After executing a query on a database server, PHP offers several functions to read the resulting lines, such as mysqli_fetch_assoc, pg_fetch_row, oci_fetch,etc.). If such functions do not return any rows, it means: (Choose 2)

A.

a SELECT statement returned no rows

B.

the transaction has been rolled back

C.

the connection to the database server was disconnected during query execution

D.

the query was too slow to execute

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

A.

TRUE

B.

FALSE

What can prevent PHP from being able to open a file on the hard drive (Choose 3)?

A.

File system permissions

B.

File is outside of open_basedir

C.

File is owned by another user and safe_mode is enabled.

D.

File is inside the /tmp directory.

E.

PHP is running as the web server user.

What will the $array array contain at the end of this script?

1

2 function modifyArray (&$array)

3 {

4 foreach ($array as &$value)

5 {

6 $value = $value + 1;

7 }

8

9 $value = $value + 2;

10 }

11

12 $array = array (1, 2, 3);

13 modifyArray($array);

14 ?>

A.

2, 3, 4

B.

2, 3, 6

C.

4, 5, 6

D.

1, 2, 3

What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?

A.

get_headers($url);

B.

get_header($url);

C.

stream_context_get_headers($url);

D.

get_headers($url, 1);

E.

get_headers($url, ASSOC_HEADERS);

What SimpleXML function is used to parse a file?

A.

simplexml_load_file()

B.

simplexml_load_string()

C.

load()

D.

loadFile()

E.

loadXML()

F.

None of the above.

A script residing at http://example.com/phpcert/cookies.php contains the following code:

1

2 setcookie('name1', 'value1', time() + 60*60*24, '/');

3 setcookie('name1', 'value2');

4 ?>

The web browser is configured to accept all cookies. How many cookies will be set by this script?

A.

0

B.

1

C.

2

D.

3

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

A.

Since 5.1 reflection is an extension that can be disabled

B.

Reflection is present in any installation of PHP 5 or later

C.

Reflection only allows to reflect on built-in classes

D.

Built-in classes can be reflected on command line using php –rc

What is the output of the following code?

echo '1' . (print '2') + 3;

A.

123

B.

213

C.

142

D.

214

E.

Syntax error