php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53106 error on example
Submitted: 2010-10-19 21:16 UTC Modified: 2010-10-20 12:18 UTC
From: ar at ailtonribeiro dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ar at ailtonribeiro dot com
New email:
PHP Version: OS:

 

 [2010-10-19 21:16 UTC] ar at ailtonribeiro dot com
Description:
------------
On http://php.net/manual/en/function.json-encode.php there is an error:

* Now:
The above example will output
...
Non-associative array output as array: [[1,2,3]]
Non-associative array output as object: {"0":{"0":1,"1":2,"2":3}}

* Correcting would be:
The above example will output
...
Non-associative array output as array: [[1,2,3]]
ASSOCIATIVE array output as object: {"0":{"0":1,"1":2,"2":3}}



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-20 02:06 UTC] kalle@php.net
-Status: Open +Status: Bogus
 [2010-10-20 02:06 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

The array is still non-associative, but its outputted as an ASSOCIATIVE object. No bug here though
 [2010-10-20 12:18 UTC] rquadling@php.net
Added associative array to json_ecode example.

http://svn.php.net/viewvc?view=revision&revision=304559
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC