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

Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP’s ext/json capabilities?
A . ‘Hello, world!’
B . function(){ alert("Hello, world!");}
C . array{‘Hello, world!’)
D . array(‘message’ => ‘Hello, world!’)

Answer: B

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments