php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55744 Inefficient manual example
Submitted: 2011-09-20 20:11 UTC Modified: 2011-09-20 21:43 UTC
From: zach dot rattner at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 5.3.8 OS: NA
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 - 4 = ?
Subscribe to this entry?

 
 [2011-09-20 20:11 UTC] zach dot rattner at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.usort#refsect1-function.usort-
examples
---

Why isn't cmp defined to be 'return $a - $b;'?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-20 21:43 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2011-09-20 21:43 UTC] aharvey@php.net
The example is overly explicit, as the note below it says. Having it laid out this 
way helps make it clearer what the return values may be from a comparison 
function.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 10:01:30 2024 UTC