Pass the Zend PHP and Zend Framework Certifications 200-550 Questions and answers with CertsForce

Viewing page 5 out of 7 pages
Viewing questions 41-50 out of questions
Questions # 41:

Which of the following does NOT help to protect against session hijacking and fixation attacks?

Options:

A.

Use SSL and set the $secure cookie parameter to true .


B.

Set the session.use_only_cookies php.ini parameter to 1 .


C.

Set the session.cookie_lifetime php.ini parameter to 0 .


D.

Protect against XSS vulnerabilities in the application.


E.

Rotate the session id on successful login and logout using session_regenerate_id()


Expert Solution
Questions # 42:

What is the name of the PHP function used to automatically load non-yet defined classes?

Options:

A.

autoload()


B.

__autoload()


C.

__catch()


D.

load()


E.

loadClass()


Expert Solution
Questions # 43:

What is the output of the following code?

class C {

public $x = 1;

function __construct() { ++$this->x; }

function __invoke() { return ++$this->x; }

function __toString() { return (string) --$this->x; }

}

$obj = new C();

echo $obj();

Options:

A.

0


B.

1


C.

2


D.

3


Expert Solution
Questions # 44:

What function can be used to retrieve an array of current options for a stream context?

Options:

A.

stream_context_get_params


B.

stream_context_get_default


C.

stream_context_get_options


D.

The 'options' element of the stream_get_meta_data return value


Expert Solution
Questions # 45:

You want to parse a URL into its single parts. Which function do you choose?

Options:

A.

parse_url()


B.

url_parse()


C.

get_url_parts()


D.

geturlparts()


Expert Solution
Questions # 46:

Which of the following is true about stream contexts? (Choose 2)

Options:

A.

A context can modify or enhance the behavior of a stream


B.

A context indicates what session the stream is part of


C.

A context is a set of parameters and stream wrapper specific options


D.

Contexts are created with new Stream_Context();


Expert Solution
Questions # 47:

Which php.ini setting is usually required to use an opcode cache?

Options:

A.

extension


B.

zend_extension


C.

optimizer


D.

dl


Expert Solution
Questions # 48:

How should class MyObject be defined for the following code to work properly? Assume $array is an array and MyObject is a user-defined class.

$obj = new MyObject();

array_walk($array, $obj);

Options:

A.

MyObject should extend class Closure


B.

MyObject should implement interface Callable


C.

MyObject should implement method __call


D.

MyObject should implement method __invoke


Expert Solution
Questions # 49:

What parsing methodology is utilized by the SimpleXML extension?

Options:

A.

SAX


B.

DOM


C.

XPath


D.

Push/Pull Approach


E.

Expat


Expert Solution
Questions # 50:

Which of the following statements about Reflection is correct?

Options:

A.

Reflection is an extension that can be disabled


B.

Reflection is a new extension present only in PHP 5.3+


C.

Reflection only allows to reflect on built-in classes


D.

Built-in classes can be reflected on command line using php --rc


Expert Solution
Viewing page 5 out of 7 pages
Viewing questions 41-50 out of questions