nerdexam
Zend

200-530 · Question #194

What is the output of the following code: str_replace(array("Apple","Orange"), array("Orange","Apple"), "Oranges are orange and Apples are green");

The correct answer is B. Apples are orange and Apples are green. See the full explanation below for the reasoning.

Question

What is the output of the following code: str_replace(array("Apple","Orange"), array("Orange","Apple"), "Oranges are orange and Apples are green");

Options

  • AApples are orange and Oranges are green
  • BApples are orange and Apples are green
  • CApples are apple and Oranges are green
  • DApples are apple and Apples are green

How the community answered

(29 responses)
  • A
    14% (4)
  • B
    76% (22)
  • C
    7% (2)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice