|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-06-27 12:21 UTC] maggus dot staab at googlemail dot com
[2017-06-27 12:23 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2017-06-27 12:23 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 15:00:01 2025 UTC |
Description: ------------ Casting a decoded simple json structure into an array doesn't allow lookups by key if the key is numeric. Test script: --------------- $a = json_decode('{"b": {"c": {"10": "abc", "11": "def"}}}'); $aa = (array)$a->b->c; var_dump($aa['10']); Expected result: ---------------- string(3) "abc" Actual result: -------------- Notice: Undefined offset: 10 in /in/d0290 on line 7 NULL