|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69555 [DE] unpredictable results with array_udiff example
Submitted: 2015-04-30 19:35 UTC Modified: 2015-04-30 23:22 UTC
From: buero at wehrstedt dot com Assigned: cmb (profile)
Status: Closed Package: Translation problem
PHP Version: 5.4Git-2015-04-30 (Git) OS: XAMPP
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.
Block user comment
Status: Assign to:
Bug Type:
From: buero at wehrstedt dot com
New email:
PHP Version: OS:


 [2015-04-30 19:35 UTC] buero at wehrstedt dot com
From manual page:

I tried out the example shown with function array_udiff. The example sets a property in the cr class, the compare function compares boolena instead of numerical.

I tried this example; as soon as I changed to $a == $b instead of $a === $b, I've got the results I exspected.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-30 20:13 UTC]
-Status: Open +Status: Feedback -Type: Bug +Type: Documentation Problem -Package: Website problem +Package: Arrays related -Assigned To: +Assigned To: cmb
 [2015-04-30 20:13 UTC]
To which example are you referring to? Example#2 uses $a == $b,
what is correct, because DateTime instances are compared.
 [2015-04-30 22:13 UTC] buero at wehrstedt dot com
-Status: Feedback +Status: Assigned
 [2015-04-30 22:13 UTC] buero at wehrstedt dot com
In the German Manual, there is no example #2, there is just one.

I meant this:

function comp_func_cr($a, $b) 
        if ($a->priv_member === $b->priv_member) return 0;
        return ($a->priv_member > $b->priv_member)? 1:-1;
 [2015-04-30 22:47 UTC]
-Summary: unpredictable results with array_udiff example +Summary: [DE] unpredictable results with array_udiff example -Package: Arrays related +Package: Translation problem
 [2015-04-30 22:47 UTC]
Ah, I see, thanks! The German translation of the array_udiff manual
page is currently not up-to-date, and the example violates strict
standards, so I suggest to ignore it. I'll update the translation
 [2015-04-30 23:20 UTC]
Automatic comment from SVN on behalf of cmb
Log: fixed #69555
 [2015-04-30 23:22 UTC]
-Status: Assigned +Status: Closed
 [2015-04-30 23:22 UTC]
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.

 [2020-02-07 09:56 UTC]
Automatic comment on behalf of cmb
Log: fixed #69555
 [2020-12-30 11:15 UTC]
Automatic comment on behalf of cmb
Log: fixed #69555
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Nov 29 10:03:14 2021 UTC