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

Zend 200-550 - Zend Certified PHP Engineer

Page: 1 / 7
Total 223 questions

What is the output of the following code?

$f = function () { return "hello"; };

echo gettype($f);

A.

hello

B.

string

C.

object

D.

function

Which MIME type is always sent by a client if a JPEG file is uploaded via HTTP?

A.

image/jpeg

B.

image/jpg

C.

image/pjpeg

D.

Depends on the client system

Which of the following is NOT a requirement for file uploads to work?

A.

The PHP directive file_uploads must be set to On

B.

The form's method attribute must be set to "post"

C.

The form must include a hidden input element with the name set to "MAX_FILE_SIZE"

D.

The form's enctype attribute must be set to "multipart/form-data"

You want to access the 3rd character of a string, contained in the variable $test. Which of the following possibilites work? (Choose 2)

A.

echo $test(3);

B.

echo $test[2];

C.

echo $test(2);

D.

echo $test{2};

E.

echo $test{3};

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

A.

dom_import_simplexml()

B.

dom_export_simplexml()

C.

simplexml_import_dom()

D.

SimpleXML2Dom()

E.

None of the above.

Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?

A.

'Hello, world!'

B.

function(){ alert("Hello, world!"); }

C.

array('Hello, world!')

D.

array('message' => 'Hello, world!')

Which line of code can be used to replace the INSERT comment in order to output "hello"?

class C {

public $ello = 'ello';

public $c;

public $m;

function __construct($y) {

$this->c = static function($f) {

// INSERT LINE OF CODE HERE

};

$this->m = function() {

return "h";

};

}

}

$x = new C("h");

$f = $x->c;

echo $f($x->m);

A.

return $this->m() . "ello";

B.

return $f() . "ello";

C.

return "h". $this->ello;

D.

return $y . "ello";

Late static binding is used in PHP to:

A.

Load dynamic libraries and extensions at runtime

B.

Use caller class information provided in static method call

C.

Resolve undefined class names by automatically including needed files

D.

Find proper method to call according to the call arguments

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

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

Which of the following tasks can be achieved by using magic methods? (Choose 3)

A.

Initializing or uninitializing object data

B.

Creating a new stream wrapper

C.

Creating an iterable object

D.

Processing access to undefined methods or properties

E.

Overloading operators like +, *, etc.

F.

Converting objects to string representation