For the function json_decode()
, there are 2 options of output, JSON Object or Array.
$obj = json_decode($json_string, false);
or
$array = json_decode($json_string, true);
Which type performs better ?
For the function
or
Which type performs better ? |
||||
|
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
For the function Codes used ( where
I found that Array is 30% ~ 50% faster than Object. |
|||||
|