Req #75915 [NEW]: json_decode recursion level misleading
| From: | chris at candm dot org dot uk | Date: | Sun, 04 Feb 2018 23:57:39 +0000 |
| Subject: | Req #75915 [NEW]: json_decode recursion level misleading | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-15410@lists.php.net to get a copy of this message | ||
From: chris at candm dot org dot uk
Operating system: linux
PHP version: 7.0.27
Package: Online Doc Editor problem
Bug Type: Feature/Change Request
Bug description:json_decode recursion level misleading
Description:
------------
The documentation suggests that json_decode will only analyse down to
the recursion level specified. But it does not say that when that
happens it will just give up.
However it would be better to alter the behaviour. It would be better if
it analysed down to and returned results for the analysis down to the
recursion level specified. e.g.
json_decode('[3,4,{"X":"Y"}]', false, 1);
should return
array(3) [
3
4
'{"X":"Y"}'
]
This would allow analysis in sections for large objects and various
other useful purposes.
rather than null;
--
Edit bug report at https://bugs.php.net/bug.php?id=75915&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75915&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75915&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75915&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75915&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75915&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75915&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75915&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75915&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75915&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75915&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75915&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75915&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75915&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75915&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75915&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75915&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75915&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75915&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75915&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75915&r=mysqlcfg