|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-11-28 16:59 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2016-11-28 16:59 UTC] requinix@php.net
[2016-11-29 11:21 UTC] hello at bweston dot me
[2016-11-29 11:33 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
Description: ------------ So I have the following ``` <?php var_dump(array_diff( [ 'q1' => true, 'q2' => true, 'q3' => false, 'q4' => false, ], [ 'q1' => false, 'q2' => false, 'q3' => false, 'q4' => false, ] )); ``` Which produces: (https://3v4l.org/WSs2s) ``` array(2) { ["q1"]=> bool(true) ["q2"]=> bool(true) } ``` Which is fine however with just one change it isn't seen. The following produces an empty array yet there is a change. (https://3v4l.org/DlnBr) ``` <?php var_dump(array_diff( [ 'q1' => true, 'q2' => true, 'q3' => false, 'q4' => false, ], [ 'q1' => false, 'q2' => true, 'q3' => false, 'q4' => false, ] )); ```