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

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>