Weekend Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free Zend 200-500 Practice Exam with Questions & Answers | Set: 5

Questions 41

What is the output of the following script?

1

2 function fibonacci (&$x1 = 0, &$x2 = 1)

3 {

4 $result = $x1 + $x2;

5 $x1 = $x2;

6 $x2 = $result;

7

8 return $result;

9 }

10

11 for ($i = 0; $i < 10; $i++) {

12 echo fibonacci() . ',';

13 }

14 ?>

Options:
A.

An error

B.

1,1,1,1,1,1,1,1,1,1,

C.

1,1,2,3,5,8,13,21,34,55,

D.

Nothing

Zend 200-500 Premium Access
Questions 42

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 43

You want to present the following formatted number: "999.000.000,00". Which function call is correct?

Options:
A.

print format_number(999000000);

B.

print number_format(999000000);

C.

print number_format(999000000, 2, ',', '.');

D.

print number_format(999000000, 2);

E.

print_number(999000000, 2, ',', '.')

Questions 44

Which of the following statements are correct? (Choose 2)

Options:
A.

It is possible to specify more than one __autoload function

B.

__autoload receives the missing class name all lowercased

C.

__autoload is being called for missing interfaces

D.

Inside __autoload missing classes trigger __autoload

Questions 45

What will be the result of the following operation?

array_combine(array("A","B","C"), array(1,2,3));

Options:
A.

array("A","B",C",1,2,3)

B.

array(1,2,3,"A","B",C")

C.

array("A"=>1,"B"=>2,"C"=>3)

D.

array(1=>"A",2=>"B",3=>"C")

E.

array(1,2,3)

Questions 46

After executing a SELECT query on a database server,

Options:
A.

All data is immediately transmitted to PHP

B.

All data will be transmitted on-demand to PHP

C.

None of the above

Questions 47

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

Questions 48

Which string will be returned by the following function call?

$test = '/etc/conf.d/wireless';

substr($test, strrpos($test, '/'));

Options:
A.

""

B.

"/wireless"

C.

"wireless"

D.

"/conf.d/wireless"

E.

"/etc"

Questions 49

How to read a single line, no matter how long from an file opened in the example below?

$fp = fopen("my_file.txt", "w");

Options:
A.

fgets($fp);

B.

fgets($fp, -1);

C.

fread($fp, 1024);

D.

fgetss($fp);

E.

None of the above

Questions 50

What function returns the filename component of the file's path:

Options:
A.

dirname()

realpath()

B.

basename()

C.

pathinfo()

D.

parse_url()

Exam Code: 200-500
Certification Provider: Zend
Exam Name: Zend PHP 5 Certification
Last Update: Jul 12, 2025
Questions: 219

Zend Related Exams

Zend Free Exams

Zend Free Exams
Enhance your Zend exam prep with free resources and practice tests from Examstrack. Achieve Zend certification success by exploring Examstrack.