Exam4Training

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

Exit mobile version