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

Zend 200-500 - Zend PHP 5 Certification

Page: 6 / 7
Total 219 questions

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?

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");

How do you allow the caller to submit a variable number of arguments to a function?

A.

Using a prototype like function test(... $parameters).

B.

Using a prototype like function test() and the function func_get_args() inside the function body.

C.

Using a prototype like function test($parameters[]).

D.

Using a prototype like function test() and the function get_variable_args() inside the function body.

E.

This is not possible in PHP.

Which one of the following technologies was not built into PHP before version 5?

A.

XSL

B.

SOAP

C.

DOM

D.

SAX

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

A.

echo $test(3)

B.

echo $test[2];

C.

echo $test(2);

D.

echo $test{2};

E.

echo $test{3}

What is the output of the following code?

1

2 $a = 'a'; $b = 'b';

3 echo isset($c) ? $a.$b.$c : ($c = 'c').'d';

4 ?>

A.

abc

B.

cd

C.

0d

What is "instanceof" an example of:

A.

a boolean

B.

an operator

C.

a function

D.

a language construct

E.

a class magic

Which of the following superglobals does not contain data from the client?

A.

$_POST

B.

$_SESSION

C.

$_GET

D.

$_SERVER

What is the purpose of the open_basedir directive?

A.

Provide a list of directories where PHP should search for files.

B.

Provide a list of directories from which PHP can open files.

C.

Provide a list of directories from which PHP cannot open files.

D.

Directory where the PHP extensions can be found.

Which of the following techniques ensures that a value submitted in a form can only be yes or no?

A.

Use a select list that only lets the user choose between yes and no.

B.

Use a hidden input field that has a value of yes or no.

C.

Enable the safe_mode configuration directive.

D.

None of the above.

In the function setcookie() what does the 3rd parameter specify?

A.

The name of the cookie.

B.

The expiration time of the cookie.

C.

The value of the cookie.

D.

The IP address of the cookie's client.