php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63213 Error in documentation
Submitted: 2012-10-03 22:51 UTC Modified: 2012-11-14 15:23 UTC
From: 666grzesiek666 at wp dot pl Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 666grzesiek666 at wp dot pl
New email:
PHP Version: OS:

 

 [2012-10-03 22:51 UTC] 666grzesiek666 at wp dot pl
Description:
------------
In documentation page there is an error in example.

Accually Array_revers when preserve key is true will maintain key to value. Example shows that it does not.

Proper output will be:
Array
(
    [0] => Array
        (
            [0] => green
            [1] => red
        )

    [1] => 4
    [2] => php
)
Array
(
    [2] => php
    [1] => 4
    [0] =>Array
        (
            [0] => green
            [1] => red
        )

)

---
From manual page: http://www.php.net/function.array-reverse#refsect1-function.array-reverse-seealso
---



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-14 14:55 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=328357
Log: bug #63213 just requires a clear example
 [2012-11-14 15:23 UTC] krakjoe@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 example has been edited for clarity. array_reverse functions as documented.
 [2012-11-14 15:23 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 09:00:02 2026 UTC