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

Viewing page 3 out of 8 pages
Viewing questions 21-30 out of questions
Questions # 21:

What is the function of backtick (`) characters in PHP?

Options:

A.

Same as single-quotes, used to enclose strings.


B.

Escape operators.


C.

No special meaning.


D.

Execute the enclosed string as a command.


E.

Error control operators.


Expert Solution
Questions # 22:

How many elements does the array $pieces contain after the following piece of code has been executed?

$pieces = explode("/", "///");

Options:

A.

0


B.

3


C.

4


D.

5


Expert Solution
Questions # 23:

What is the difference between "print" and "echo"?

Options:

A.

There is no difference.


B.

Print returns length of data printed and echo does not


C.

Echo returns length of the data printed and print does not


D.

Print buffers the output, while echo does not


E.

None of the above


Expert Solution
Questions # 24:

You want to extract the pieces of a date string, which looks like this:

"2005-11-02". Which of the following pieces of code will properly assign $year,

$month and $day with their respective values?

Options:

A.

sscanf("2005-11-02", '%d-%d-%d', $year, $month, $day);


B.

scan("2005-11-02", '%d-%d-%d', $year, $month, $day);


C.

sscanf('%d-%d-%d', "2005-11-02", $year, $month, $day);


D.

sscan($year, $month, $date '%d-%d-%d', "2005-11-02");


Expert Solution
Questions # 25:

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;

Options:

A.

2


B.

1


C.

0


D.

3


E.

No Output, PHP will generate an error message.


Expert Solution
Questions # 26:

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

Options:

A.

html_display


B.

error_reporting


C.

display_errors


D.

error_log


E.

ignore_repeated_errors


Expert Solution
Questions # 27:

What is the output of the following code?

str_pad('PHP', 10, 'P', STR_PAD_BOTH);

Options:

A.

H


B.

PHPPPPPPPP


C.

PPPPHPPPPP


D.

PPPPPPPPHP


Expert Solution
Questions # 28:

The following code piece should print "PHP is cool", but unexpectedly, it just prints "cool". How would you correct it?

echo str_replace('PHP is a pain.', 'a pain', 'cool');

Options:

A.

str_replace('PHP is a pain.', 'cool', 'a pain');


B.

str_replace('a pain', 'cool', 'PHP is a pain.');


C.

str_replace('cool', 'a pain', 'PHP is a pain.');


Expert Solution
Questions # 29:

What does the __FILE__ constant contain?

Options:

A.

The filename of the current script.


B.

The full path to the current script.


C.

The URL of the request made.


D.

The path to the main script.


Expert Solution
Questions # 30:

Where does the session extension store the session data by default?

Options:

A.

SQLite Database


B.

MySQL Database


C.

Shared Memory


D.

File system


E.

Session Server


Expert Solution
Viewing page 3 out of 8 pages
Viewing questions 21-30 out of questions