πŸ“Š PHP
Q. What will be the output?
Code:
$json = '{"a":1}';
$obj = json_decode($json);
echo $obj->a;
  • (A) 1
  • (B) Error
  • (C) NULL
  • (D) a
πŸ’¬ Discuss
βœ… Correct Answer: (D) a

Explanation: json_decode returns object by default.

Explanation by: Roshan
json_decode returns object by default.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
4
Total Visits
πŸ“½οΈ
8 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
90%
Success Rate