Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 6 Question 72 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 72
Topic #: 6
[All 200-710 Questions]

How many times will the function counter() be executed in the following code?

function counter($start, &$stop)

{

if ($stop > $start)

{

return;

}

counter($start--, ++$stop);

}

$start = 5;

$stop = 2;

counter($start, $stop);

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Gerald
4 days ago
I see, I think it's because the function is called recursively until $stop is greater than $start.
upvoted 0 times
...
Vilma
5 days ago
I believe it will be executed 5 times.
upvoted 0 times
...
Julio
8 days ago
I think the correct answer is C) 5. The function counter() will be executed 5 times because the loop continues until $stop is greater than $start.
upvoted 0 times
...
Gerald
9 days ago
I think the function will be executed 4 times.
upvoted 0 times
...

Save Cancel