Unexpected error when using json_decode
Summary
Fatal error: Out of memory (allocated 400293888) (tried to allocate 51 bytes)Content
Hello,
I have encountered a problem when trying to decode a JSON response from an API.
Using the following code "$result = json_decode($result,true);" throw an error "Fatal error: Out of memory (allocated 400293888) (tried to allocate 51 bytes) ".
Initially i thought this could be due to the length of the JSON response, but it turned out to be a small JSON response throw an error, Below is the JSON that throw the fatal error when trying toe use Json_decode
'{ "Results": { "Incident": 12345, "Orders": [ { "OrderNumber": 66899900, "OrderRef": "ABC"}, { "OrderNumber": 512072544, "OrderRef": "JJUUJKI"} ] } }'
Tagged:
0