BlackFriday 2024! 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 70 Discussion

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

What will the following code piece print?

echo strtr('Apples and bananas', 'ae', 'ea')

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Lucy
4 months ago
I think the answer is C) Apples and bananas because 'strtr' replaces 'a' with 'e' and 'e' with 'a'.
upvoted 0 times
...
Truman
4 months ago
Ah, the age-old 'Apples and bananas' trick question. I bet the correct answer is something completely unexpected, like 'Epplas end benenes'. Gotta keep them on their toes, eh?
upvoted 0 times
...
Jose
4 months ago
But the 'strtr' function replaces characters in a string, so it should be A.
upvoted 0 times
...
Cherelle
4 months ago
Wait, what? Swapping 'ae' to 'ea'? I'm so confused, I'm just going to go with C and hope for the best.
upvoted 0 times
Lea
2 months ago
I'm going with C) Apples and bananas
upvoted 0 times
...
Aja
3 months ago
I believe it will output D) Applas end bananas
upvoted 0 times
...
Carolann
3 months ago
I think it will print B) Epplas end benenes
upvoted 0 times
...
Corinne
3 months ago
I'm going with C, Apples and bananas.
upvoted 0 times
...
Jani
3 months ago
I'm going with C, Apples and bananas
upvoted 0 times
...
Louis
3 months ago
I think it will print Applas end benenes.
upvoted 0 times
...
Alease
3 months ago
I believe it will print Epplas end benenes
upvoted 0 times
...
Miles
4 months ago
I think it will print Applas end benenes
upvoted 0 times
...
...
Nettie
4 months ago
Apples and bananas? Nah, that can't be right. Gotta be D, 'Applas end bananas'.
upvoted 0 times
...
Laurel
4 months ago
I disagree, I believe the answer is B) Epplas end benenes.
upvoted 0 times
...
Dorothy
4 months ago
Hmm, looks like a tricky one. Let's see, 'ae' gets swapped to 'ea' - I'm going with B.
upvoted 0 times
Lezlie
3 months ago
I agree, it should be B) Epplas end benenes
upvoted 0 times
...
Lucy
3 months ago
I'm going with B) Epplas end benenes
upvoted 0 times
...
Shenika
3 months ago
I believe it will be A) Applas end benenes
upvoted 0 times
...
Rodrigo
4 months ago
I think it will print B) Epplas end benenes
upvoted 0 times
...
...
Jose
4 months ago
I think the answer is A) Applas end benenes.
upvoted 0 times
...

Save Cancel