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

Zend 200-500 - Zend PHP 5 Certification

Page: 1 / 7
Total 219 questions

What is the output of the following script?

1

2 class a

3 {

4 public $val;

5 }

6

7 function renderVal (a $a)

8 {

9 if ($a) {

10 echo $a->val;

11 }

12 }

13

14 renderVal (null);

15 ?>

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

What is the output of the following code?

class test {

public $value = 0;

function test() {

$this->value = 1;

} function __construct() {

$this->value = 2;

}}

$object = new test();

echo $object->value;

A.

2

B.

1

C.

0

D.

3

E.

No Output, PHP will generate an error message.

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

A.

Class

B.

String

C.

Object

D.

Array

What DOMElement method should be used to check for availability of a non-namespaced attribute?

A.

getAttributeNS()

B.

getAttribute()

C.

hasAttribute()

D.

hasAttributeNS()

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?

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.

What is the maximum size of the VARCHAR column type?

A.

255 Bytes

B.

255 Characters

C.

512 Bytes

D.

512 Characters

E.

No Limit

One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?

A.

html_display

B.

error_reporting

C.

display_errors

D.

error_log

E.

ignore_repeated_errors

Which of the following can be registered as entry points with a SoapServer instance (choose 3)

A.

A single function

B.

A single method from a class

C.

Multiple functions at once

D.

All methods from a class

E.

All classes defined in a script

Given the following code, what is correct?

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

}

$z = new stdClass;

f($z);

var_dump($z);

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

How many times will the function counter() be executed in the following code?

function counter($start, &$stop)

{

if ($stop > $start)

{

return;

} counter($start--, ++$stop);

}

$start = 5;

$stop = 2;

counter($start, $stop);

A.

3

B.

4

C.

5

D.

6