Doc #72201 [Ver->Wfx]: The doc of the callback param of array_udiff_assoc is inaccurate

From: Date: Mon, 28 Dec 2020 15:42:55 +0000
Subject: Doc #72201 [Ver->Wfx]: The doc of the callback param of array_udiff_assoc is inaccurate
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18334@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72201&edit=1 ID: 72201 Updated by: cmb@php.net Reported by: eran dot kornblau at kaltura dot com Summary: The doc of the callback param of array_udiff_assoc is inaccurate -Status: Verified +Status: Wont fix Type: Documentation Problem Package: Arrays related PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Disregard my comment above. Actually, the functions which *currently* do not care about anything than (in)equality to zero are: array_diff_key(), array_diff_assoc(), array_udiff_assoc(), array_intersect_key(), array_intersect_assoc() and array_uintersect_assoc(). However, at least in theory the implementation of these functions may change in the future so they use some kind of ordering, so changing the docs could introduce forward compatibility issues. Previous Comments: ------------------------------------------------------------------------ [2018-10-02 21:35:00] cmb@php.net Same for array_udiff(), array_udiff_uassoc(), array_uintersect(), array_uintersect_assoc() and array_uintersect_uassoc(). ------------------------------------------------------------------------ [2016-05-11 17:54:50] eran dot kornblau at kaltura dot com Description: ------------ Looking at the code, this function only cares whether the callback returns zero or nonzero, it does not care whether the value is negative or positive like the docs say. This makes sense because this function does not involve any ordering, only comparison of elements ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72201&edit=1

« previous php.doc.bugs (#18334) next »