Pass the Zend Zend Certification 200-500 Questions and answers with CertsForce

Viewing page 6 out of 7 pages
Viewing questions 51-60 out of questions
Questions # 51:

Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?

Options:

A.

$_GET['ALL']


B.

$_SERVER['QUERY']


C.

$_SERVER['QUERY_STRING']


D.

$_ENV['QUERY']


E.

$QUERY_STRING


Questions # 52:

What is the result of the following code:

class T

{ const A

=

42 + 1;

}

echo T::A;

Options:

A.

42


B.

43


C.

Parse error


Questions # 53:

What is the method used to execute XPath queries in the SimpleXML extension?

Options:

A.

xpathQuery()


B.

xpath()


C.

simpleXMLXpath()


D.

query()


E.

evaluate()


Questions # 54:

How can a PHP extension be loaded? (Choose 2)

Options:

A.

ini_set("extension", "extension.so");


B.

dl("extension.so");


C.

extension_load("extension.so");


D.

extension=extension.so inside php.ini


Questions # 55:

Which of the following may be used in conjunction with CASE inside a SWITCH statement?

Options:

A.

A scalar


B.

An expression


C.

A boolean


D.

All of the above


Questions # 56:

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


Questions # 57:

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


Questions # 58:

What is the output of the following script?

1 <?php

2 class a

3 {

4 public $val = 10;

5 }

6

7 function renderVal (a $a)

8 {

9 return $a->$val;

10 }

11

12 renderVal (new a);

13 ?>

Options:

A.

Nothing


B.

NULL


C.

A fatal error


D.

$val


E.

10


Questions # 59:

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


Questions # 60:

Which of the following function signatures is correct if you want to have classes automatically loaded?

Options:

A.

function autoload($class_name)


B.

function __autoload($class_name, $file)


C.

function __autoload($class_name)


D.

function _autoload($class_name)


E.

function autoload($class_name, $file)


Viewing page 6 out of 7 pages
Viewing questions 51-60 out of questions