Labour Day Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: geek65

200-530 Zend PHP 5.3 Certification Questions and Answers

Questions 4

How can precisely one byte be read from a file, pointed by $fp? (Choose 2)

Options:

A.

fread($fp, 1);

B.

fgets($fp, 1);

C.

fgetss($fp, 1);

D.

fgetc($fp);

E.

All of the above

Buy Now
Questions 5

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

Buy Now
Questions 6

The following form is loaded in a recent browser and submitted, with the second list element selected:

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

Options:

A.

1

B.

2

C.

two

D.

null (since the value attribute of the list has not been set)

Buy Now
Questions 7

Which of the following statements about PHP is true? (Choose 3)

Options:

A.

A final class can be derived.

B.

A final class may be instantiated.

C.

A class with a final function may be derived.

D.

Static functions can be final.

E.

Properties can be final.

Buy Now
Questions 8

Which of the following commands will append data to an existing file?

Options:

A.

file_put_contents("file", "data", "a");

B.

file_put_contents("file", "a", "data");

C.

file_put_contents("file", "data", FILE_APPEND);

D.

file_put_contents("file", "a", NULL, FILE_APPEND);

Buy Now
Questions 9

What is the output of the following code?

Options:

A.

A syntax error in the function declaration line

B.

An error, because null is not an instance of 'a'

C.

Nothing, because a null value is being passed to renderVal()

D.

NULL

Buy Now
Questions 10

How can you determine if magic_quotes_gpc is enabled? (Choose 2)

Options:

A.

Use the get_magic_quotes() function.

B.

Using the get_magic_quotes_runtime() function.

C.

Use the get_magic_quotes_gpc() function.

D.

Using ini_get('magic_quotes_gpc').

E.

Using ini_get('magic_quotes').

Buy Now
Questions 11

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

Buy Now
Questions 12

Which elements can be encapsulated by namespaces?

Options:

A.

Only classes

B.

Classes, functions and constants

C.

Classes, functions, constants and variables

Buy Now
Questions 13

Which parts of the text are matched in the following regular expression?

Options:

A.

bang bong bung

B.

bang bonged bung

C.

big bang bong bung

D.

big bang bung

Buy Now
Questions 14

Given the following two functions, what statement is correct?

function dynamicNew($name) {

return new $name;

}

function reflectionNew($name) {

$r = new ReflectionClass($name);

return $r->newInstanceArgs();

}

Options:

A.

Both functions do the same

B.

dynamicNew() results in a parse error, reflectionNew() works

Buy Now
Questions 15

Which of the following code snippets writes the content of the “source.txt” to “target.txt”?

Options:

A.

file_put_contents("target.txt", fopen("source.txt", "r"));

B.

file_put_contents("target.txt", readfile("source.txt"));

C.

file_put_contents("target.txt", join(file("source.txt"), ""));

D.

file_put_contents("target.txt", file_get_contents("source.txt"));

E.

$handle = fopen("target.txt", "w+"); fwrite($handle,

file_get_contents("source.txt")); fclose($handle);

Buy Now
Questions 16

What is the output of the following code?

1

2 function append($str)

3 {

4 $str = $str.'append';

5 }

6

7 function prepend(&$str)

8 {

9 $str = 'prepend'.$str;

10 }

11

12 $string = 'zce';

13 append(prepend($string));

14 echo $string;

15 ?>

Options:

A.

zceappend

B.

prependzceappend

C.

prependzce

D.

zce

Buy Now
Questions 17

Which of the following is NOT a valid function declaration?

Options:

A.

function x ($x1 = array())

B.

function x (A $x1)

C.

function x (A $x1 = null)

D.

function x ($x1 = $x2)

Buy Now
Questions 18

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

Options:

A.

TRUE

B.

FALSE

Buy Now
Questions 19

An HTML form contains this form element:

The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?

Options:

A.

$_IMAGE['myImage']['x'] and $_IMAGE['myImage']['y']

B.

$_POST['myImage']['x'] and $_POST['myImage']['x']

C.

$_POST['myImage.x'] and $_POST['myImage.y']

D.

$_POST['myImage_x'] and $_POST['myImage_y']

Buy Now
Questions 20

How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml?

One

Two

Options:

A.

$xml->getElementById('2');

B.

$xml->foo->bar->baz[2]['id']

C.

$xml->foo->baz[2]['id']

D.

$xml->foo->bar->baz[1]['id']

E.

$xml->bar->baz[1]['id']

Buy Now
Questions 21

Which of the following parts must a XML document have in order to be well-formed?

Options:

A.

An XML declaration

B.

A root element

C.

A specified encoding

D.

A reference to either a DTD or an XML schema definition

Buy Now
Questions 22

You are creating an application that generates invoices in a variety of formats, including PDF, ODS and HTML. Each of these formats is represented as a PHP class in your application. While some of the operations can be performed on all of the different formats (such as saving and loading), other operations may be specific to one or two of the formats (such as setting as read only). Which design pattern should you use for this application?

Options:

A.

Adapter

B.

Factory

C.

MVC

D.

Singleton

Buy Now
Questions 23

Which string will be returned by the following function call?

$test = '/etc/conf.d/wireless';

substr($test, strrpos($test, '/'));

Options:

A.

""

B.

"/wireless"

C.

"wireless"

D.

"/conf.d/wireless"

E.

"/etc"

Buy Now
Questions 24

What is the output of the following code?

$first = "second";

$second = "first";

echo $$$first;

Options:

A.

first

B.

second

C.

an empty string

D.

an error

Buy Now
Questions 25

Consider the following code. Which keyword should be used in the line marked in bold to make this code work as intended?

Options:

Buy Now
Questions 26

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

Buy Now
Questions 27

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)

Options:

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.

Buy Now
Questions 28

Which of the following functions can help prevent session fixation vulnerabilities?

Options:

A.

magic_quotes_gpc()

B.

strip_tags()

C.

addslashes()

D.

session_regenerate_id()

Buy Now
Questions 29

What is the file locking mode that should be used when writing to a file?

Options:

A.

LOCK_UN

B.

LOCK_SH

C.

LOCK_EX

D.

LOCK_NB

Buy Now
Questions 30

Which session function can help to avoid session fixation?

Options:

A.

session_is_registered()

B.

session_register()

C.

session_unregister()

D.

session_regenerate_id()

E.

None of the above.

Buy Now
Questions 31

What is the output of the following code?

Options:

A.

An error

B.

1,1,1,1,1,1,1,1,1,1,

C.

1,1,2,3,5,8,13,21,34,55,

D.

Nothing

Buy Now
Questions 32

What will the following function call print?

printf('%010.6f', 22);

Options:

A.

22

B.

22.00

C.

022.000000

D.

22.000000

Buy Now
Questions 33

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

Buy Now
Questions 34

After running this sort, what will be the value of $b?

$a = array('_!', 'def', 0);

$b = sort($a);

Options:

A.

array(0, 'def', '_!')

B.

array('_!', 0, 'def')

C.

array('def', 0, '_!)

D.

None of the above

Buy Now
Questions 35

Do constants have global scope or local scope?

Options:

A.

They have global scope

B.

They have local scope

C.

They have both global and local scope

D.

They have neither global nor local scope

Buy Now
Questions 36

What is the output of the following code?

1

2 for ($i = 0; $i < 1.02; $i += 0.17) {

3 $a[$i] = $i;

4 }

5 echo count($a);

6 ?>

Options:

A.

0

B.

1

C.

2

D.

6

E.

7

Buy Now
Questions 37

Which of the following are valid identifiers (Choose 3)

Options:

A.

function 4You() { }

B.

function _4You() { }

C.

function object() { }

D.

$1 = "Hello";

E.

$_1 = "Hello World";

Buy Now
Questions 38

Which one of the following technologies was not built into PHP before version 5?

Options:

A.

XSL

B.

SOAP

C.

DOM

D.

SAX

Buy Now
Exam Code: 200-530
Exam Name: Zend PHP 5.3 Certification
Last Update: Apr 28, 2024
Questions: 254
200-530 pdf

200-530 PDF

$28  $80
200-530 Engine

200-530 Testing Engine

$33.25  $95
200-530 PDF + Engine

200-530 PDF + Testing Engine

$45.5  $130