nerdexam
Zend

200-550 · Question #218

Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?

The correct answer is B. function(){ alert("Hello, world!"); }. See the full explanation below for the reasoning.

Question

Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?

Options

  • A'Hello, world!'
  • Bfunction(){ alert("Hello, world!"); }
  • Carray('Hello, world!')
  • Darray('message' => 'Hello, world!')

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    74% (23)
  • C
    16% (5)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 200-550 Practice