nerdexam
Zend

200-710 · Question #194

What will the following code piece print? echo strtr('Apples and bananas', 'ae', 'ea');

The correct answer is A. Applas end benenes. See the full explanation below for the reasoning.

Strings & Patterns

Question

What will the following code piece print? echo strtr('Apples and bananas', 'ae', 'ea');

Options

  • AApplas end benenes
  • BEpplas end bananes
  • CApples and bananas
  • DApplas end bananas

How the community answered

(37 responses)
  • A
    73% (27)
  • B
    16% (6)
  • C
    8% (3)
  • D
    3% (1)

Topics

#strtr#character translation#string manipulation

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice