Labour Day Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

200-500 Sample Questions Answers

Questions 4

The constructs for(), foreach(), and each() can all be used to iterate an object if the object

Options:

A.

implements ArrayAccess

B.

implements Iterator

C.

implements Iterator and ArrayAccess

D.

None of the above

Buy Now
Questions 5

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

Options:

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

Buy Now
Questions 6

What is the output of the following code?

try {

class MyException extends Exception {};

try {

throw new MyException;

}

catch (Exception $e) {

echo "1:";

throw $e;

}c

atch (MyException $e) {

echo "2:";

throw $e;

}}

catch (Exception $e) {

echo get_class($e);

}

Options:

A.

A parser error, try cannot be followd by multiple catch

B.

1:

C.

2:

D.

1:Exception

E.

1:MyException

F.

2:MyException

G.

MyException

Buy Now
Questions 7

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 8

Which of the following superglobals does not contain data from the client?

Options:

A.

$_POST

B.

$_SESSION

C.

$_GET

D.

$_SERVER

Buy Now
Questions 9

Which 2.17of the following formats is used to describe web services?

Options:

A.

WSDL

B.

UDDI

C.

SOAP

D.

XLANG

Buy Now
Questions 10

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

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.

Options:

A.

a)

B.

b)

C.

c)

D.

d)

E.

e)

Buy Now
Questions 11

Would the following code catch a parse error?

try {

echo $label

} catch (Exception $e) {

echo $e->getMessage();

}

Options:

A.

Yes

B.

No

Buy Now
Questions 12

You want to run the following PHP 4 code with PHP 5. In the following example, which access modifier in PHP 5 is equivalent to "var"?

class Test {

var $tester;

}

Options:

A.

protected

B.

invisible

C.

public

D.

private

E.

outofscope

Buy Now
Questions 13

Given the following code, what is correct?

function f(stdClass &$x = NULL) { $x = 42;

}

$z = new stdClass;

f($z);

var_dump($z);

Options:

A.

Error: Typehints cannot be NULL

B.

Error: Typehints cannot be references

C.

Result is NULL

D.

Result is object of type stdClass

E.

Result is 42

Buy Now
Questions 14

Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?

Options:

A.

TRUE

B.

FALSE

C.

ENT_QUOTES

D.

ENT_NOQUOTES

E.

ENT_COMPAT

Buy Now
Questions 15

Which piece of code will return the ASCII value of a character?

Options:

A.

(int)'t';

B.

ord('t');

C.

to_ascii('t');

D.

chr('t');

Buy Now
Questions 16

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?

Options:

A.

0

B.

1

C.

2

D.

3

Buy Now
Questions 17

Identify the security vulnerability in the following example:

1

2 mail('feedback@example.org',

3 'Feddback',

4 'Here is my feedback.',

5 "From: {$_COOKIE['email']}");

6 ?>

Options:

A.

Remote Code Injection

B.

Cross-Site Request Forgeries

C.

Email Injection

D.

None of the above

Buy Now
Questions 18

What SimpleXML function is used to parse a file?

Options:

A.

simplexml_load_file()

B.

simplexml_load_string()

C.

load()

D.

loadFile()

E.

loadXML()

F.

None of the above.

Buy Now
Questions 19

How can a SimpleXML object be converted to a DOM object?

Options:

A.

dom_import_simplexml()

B.

dom_export_simplexml()

C.

simplexml_import_dom()

D.

SimpleXML2Dom()

E.

None of the above.

Buy Now
Questions 20

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 21

What function allows resizing of PHP's file write buffer?

Options:

A.

ob_start()

B.

set_write_buffer()

C.

stream_set_write_buffer()

D.

Change the output_buffering INI setting via ini_set() function

Buy Now
Questions 22

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

Options:

A.

you can only throw classes derived from Exception

B.

a try block can have multiple catch blocks

C.

a try block must not be followed by a catch block

D.

try blocks cannot contain nested try blocks

Buy Now
Questions 23

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 24

When PHP is running on a command line, what super-global will contain the command line arguments specified?

Options:

A.

$_SERVER

B.

$_ENV

C.

$GLOBALS

D.

$_POST

E.

$_ARGV

Buy Now
Questions 25

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

Options:

A.

It is possible to specify more than one __autoload function

B.

__autoload receives the missing class name all lowercased

C.

__autoload is being called for missing interfaces

D.

Inside __autoload missing classes trigger __autoload

Buy Now
Questions 26

What is the purpose of the 4th argument to the file_get_contents() function?

Options:

A.

Indicate the number of bytes to read

B.

Specifies the stream context

C.

Indicates whether or not include_path should be used

D.

Identifies the starting offset

E.

None of the above

Buy Now
Questions 27

What is the output of the following code?

$a = 1;

++$a;

$a*=$a;

echo $a--;

Options:

A.

4

B.

3

C.

5

D.

0

E.

1

Buy Now
Questions 28

An HTML form contains this form element:

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

1

2 move_uploaded_file(

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

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

5 ?>

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

(Choose 2)

Options:

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

Buy Now
Questions 29

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
Questions 30

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

Buy Now
Questions 31

Which of the following statements is NOT correct?

Options:

A.

Only methods can have type hints

B.

Typehints can be optional

C.

Typehints can be references

Buy Now
Questions 32

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.

Buy Now
Exam Code: 200-500
Exam Name: Zend PHP 5 Certification
Last Update: Apr 23, 2024
Questions: 219
$64  $159.99
$48  $119.99
$40  $99.99
buy now 200-500