Bug #78685 [Opn->Nab]: wong..

From: Date: Fri, 18 Oct 2019 10:12:46 +0000
Subject: Bug #78685 [Opn->Nab]: wong..
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223238@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78685&edit=1

 ID:                 78685
 Updated by:         pmmaga@php.net
 Reported by:        shan dot liu at msn dot com
 Summary:            wong..
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            *General Issues
 Operating System:   all
 PHP Version:        7.3.10
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

As stated in the documentation, array_diff compares the values present in the arrays. If you want
the check to include the keys, you should use array_diff_assoc.


Previous Comments:
------------------------------------------------------------------------
[2019-10-18 10:02:49] shan dot liu at msn dot com

Description:
------------
$a=array (
    'Fsku_id' => '30857',
);
$b=array (
    'Fsku_id' => '',
    'Fproduct_id' => '30857',
);
print_r(array_diff($a, $b));
output:
Array
(
)


Test script:
---------------
$a=array (
    'Fsku_id' => '30857',
);
$b=array (
    'Fsku_id' => '',
    'Fproduct_id' => '30857',
);
print_r(array_diff($a, $b));
output:
Array
(
)




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78685&edit=1


Thread (2 messages)

« previous php.bugs (#223238) next »