|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-29 11:47 UTC] chad at herballure dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 16:00:01 2025 UTC |
Description: ------------ When asked to encode a circular data structure, json_encode does not notice. Reproduce code: --------------- <?php $data = array('a' => 12); $data['bad'] =& $data; var_dump(json_encode($data)); ?> Expected result: ---------------- Some sort of error about object recursion, as this is not supported by JSON. Actual result: -------------- PHP Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 128 bytes) ...