nerdexam
Zend

200-710 · Question #58

QUESTION 61 Given a JSON-encoded string, which code sample correctly indicates how to decode the string to native PHP values?

The correct answer is C. $value = json_decode($jsonValue). See the full explanation below for the reasoning.

Data Formats & Types

Question

QUESTION 61 Given a JSON-encoded string, which code sample correctly indicates how to decode the string to native PHP values?

Options

  • A$json = new Json($jsonValue); $value = $json->decode();
  • B$value = json::decode($jsonValue);
  • C$value = json_decode($jsonValue);
  • D$value = Json::fromJson($jsonValue);

How the community answered

(42 responses)
  • A
    5% (2)
  • B
    10% (4)
  • C
    71% (30)
  • D
    14% (6)

Topics

#json_decode#JSON#data parsing

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice