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)- A5% (2)
- B10% (4)
- C71% (30)
- D14% (6)
Topics
#json_decode#JSON#data parsing
Community Discussion
No community discussion yet for this question.