New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free and Premium Zend 200-530 Dumps Questions Answers

Page: 1 / 10
Total 254 questions

Zend PHP 5.3 Certification Questions and Answers

Question 1

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
Question 2

Consider the following two files. When you run test.php, what would the output look like?

Options:

A.

12, 12

B.

12, 24

C.

24, 12

D.

24, 24

E.

PHP Fetal error. Cannot redeclare strlen()

Question 3

Which of the listed changes would you make to the following PHP 4 code in order to make it most compliant with PHP 5? (Choose 2)

class Car {

var $model;

function Car($model) {

$this->model = $model;

} function toString() {

return "I drive a $this->model.";

}}

$c = new Car('Dodge');

echo $c->toString();

?>

Options:

A.

Change var to public or private

B.

Change function Car to function_construct

C.

Change "I drive a $this->model." to "I drive a {$this->model}."

D.

Change function toString()to static function toString()

Question 4

After performing the following operations:

$a = array('a', 'b', 'c');

$a = array_keys(array_flip($a));

What will be the value of $a?

Options:

A.

array('c', 'b', 'a')

B.

array(2, 1, 0)

C.

array('a', 'b', 'c')

D.

None of the above

Question 5

What is the output of the following code?

Options:

A.

0

B.

An integer overflow error

C.

A warning, because $x1 is not set

D.

A warning, because $x2 is not set

E.

A floating-point overflow error

F.

Nothing

Question 6

What is the name of the key in $_FILES['name'] that contains the number of bytes of the uploaded file?

Options:

Question 7

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)

Options:

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

Question 8

What will be the result of the following operation?

array_combine(array("A","B","C"), array(1,2,3));

Options:

A.

array("A","B",C",1,2,3)

B.

array(1,2,3,"A","B",C")

C.

array("A"=>1,"B"=>2,"C"=>3)

D.

array(1=>"A",2=>"B",3=>"C")

E.

array(1,2,3)

Question 9

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

Question 10

What is the output of the following code?

Options:

Question 11

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

Options:

A.

XSL

B.

SOAP

C.

DOM

D.

SAX

Question 12

How can the constant defined below be accessed from within PHP?

class myClass {

const FOO = 'BAR';

}

Options:

A.

myClass::$FOO

B.

myClass::$$FOO

C.

myClass::FOO

D.

myClass::foo

E.

$foo::myClass

Question 13

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

Options:

Question 14

Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)

Options:

A.

XML-RPC

B.

SOAP

C.

WSDL

D.

UDDI

Question 15

What does the chown() function do?

Options:

A.

Change the file permissions.

B.

Change the owner of the file.

C.

Change the group of the file.

D.

Checks if the file is accessible.

Question 16

Which of the following data types is implicitly passed by reference in PHP 5 while it is passed by value in PHP 4?

Options:

A.

Class

B.

String

C.

Object

D.

Array

Question 17

Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?

Options:

A.

Strip all occurrences of the string script.

B.

Strip all occurrences of the string javascript.

C.

Enable magic_quotes_gpc.

D.

None of the above.

Question 18

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

Question 19

Transactions are used to:

Options:

A.

guarantee high performance

B.

secure data consistency

C.

secure access to the database

D.

reduce the database server overhead

E.

reduce code size in PHP

Question 20

Is the following code piece E_STRICT compliant?

final class Testing {

private $test;

public function tester() {

return "Tested!";

}}

Options:

A.

Yes

B.

No

Question 21

What DOM method is used to load HTML files?

Options:

A.

load()

B.

loadXML()

C.

loadHTML()

D.

loadHTMLFile()

Question 22

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

Question 23

What object method specifies post-serialization behavior for an object?

Options:

A.

__sleep()

B.

__wakeup()

C.

__set_state()

D.

__get()

E.

__autoload()

Question 24

Identify the security vulnerability in the following example:

1

2 echo "Welcome, {$_POST['name']}.";

3 ?>

Options:

A.

SQL Injection

B.

Cross-Site Scripting

C.

Remote Code Injection

D.

None of the above

Question 25

Can calls to Web Services be queued natively in PHP?

Options:

A.

Yes

B.

No

C.

Only if PHP is compiled with --enable-soap-queue

Question 26

Which of the following statements is NOT true?

a) Class constants are public

b) Class constants are being inherited

c) Class constants can omit initialization (default to NULL)

d) Class constants can be initialized by consts

Options:

A.

a)

B.

b)

C.

c)

D.

d)

Question 27

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

<input type="checkbox" name="accept">

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

Options:

A.

accept

B.

ok

C.

true

D.

on

Question 28

How do you allow the caller to submit a variable number of arguments to a function?

Options:

A.

Using a prototype like function test(... $parameters).

B.

Using a prototype like function test() and the function func_get_args() inside the function body.

C.

Using a prototype like function test($parameters[]).

D.

Using a prototype like function test() and the function get_variable_args() inside the function body.

E.

This is not possible in PHP.

Question 29

What do bytecode caches do?

Options:

A.

Cache the output of PHP scripts for reuse

B.

Translate PHP bytecode into machine code and cache the results

C.

Save the results of the compilation of PHP scripts for reuse

D.

Save large data structures (e.g. database result sets) in memory for reuse

Question 30

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.

Question 31

What is the purpose of the open_basedir directive?

Options:

A.

Provide a list of directories where PHP should search for files.

B.

Provide a list of directories from which PHP can open files.

C.

Provide a list of directories from which PHP cannot open files.

D.

Directory where the PHP extensions can be found.

Question 32

What is the result of the following code?

Options:

A.

42

B.

43

C.

Parse error

Question 33

Webservices are primarily meant to support

Options:

A.

business-to-business communication

B.

machine-to-machine interaction

C.

improved accessibility for websites

Question 34

Your application needs to handle file uploads performed with HTTP PUT. How can you retrieve this data?

Options:

A.

php://input stream

B.

php://upload stream

C.

$_FILES superglobal

D.

$_PUT superglobal

Question 35

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

Question 36

Some databases support the LIMIT clause. It is a method to ensure that ...

Options:

A.

only certain rows are deleted in DELETE queries.

B.

only a defined subset of rows are read in SELECT queries.

C.

only certain users can access the database.

Question 37

PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...

Options:

A.

implements Traversable

B.

is an instance of ArrayObject

C.

implements ArrayAccess

D.

None of the above

Question 38

What will the following function call return?

strstr(' ', '/');

Options:

A.

/example.com/

B.

/file.php

C.

file.php

D.

//example.com/test/file.php

Page: 1 / 10
Total 254 questions