php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69604 Doubtful examples
Submitted: 2015-05-08 15:06 UTC Modified: 2015-05-14 12:12 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: cmb@php.net Assigned: salathe (profile)
Status: Closed Package: Arrays related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2015-05-08 15:06 UTC] cmb@php.net
Description:
------------
---
From manual page: http://www.php.net/function.natsort
---

The third and fourth parts of example #2 are doubtful.

Part three says "Other characters interfering", but the example
doesn't show any interference (actually, it's the same behavior as
shown in example #1).

Part four isn't an example of natsort(), but rather of uksort() in
combination with strnatcmp(), so it should better be moved to one
of these man pages.


Patches

natsort-doubtful-examples (last revision 2015-05-10 07:15 UTC by mvs dot php at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-14 12:01 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=336772
Log: Removes examples that a) don't demonstrate output that relates to the purpose of the example and b) relate more to another function (usort) than the function which is the topic of the manual page (natsort)  (doc bug #69604)

--
Provided by Melanie King (mvs.php@gmail.com)
 [2015-05-14 12:11 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2015-05-14 12:11 UTC] salathe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Those parts of the example have been removed.  The fourth part may be coming back as a "note" or tip on how to naturally sort by array key, at some point in the future, but won't be in the main natsort() examples section. 

Thanks again to Melanie, who contributed her first patch via the online documentation editor for this.
 [2015-05-14 12:12 UTC] salathe@php.net
Gah, wrong "quick fix" text yet again! The first part of my previous reply should have said:

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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 10:01:32 2024 UTC