|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-04-30 19:35 UTC] buero at wehrstedt dot com
Description: ------------ --- From manual page: http://www.php.net/function.array-udiff --- 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
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; }