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)- A3% (1)
- B74% (23)
- C16% (5)
- D6% (2)
Community Discussion
No community discussion yet for this question.