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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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 14:01:29 2024 UTC