📜  php 数组相等 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.736000             🧑  作者: Mango

代码示例1
$arraysAreEqual = ($a == $b);     // TRUE if $a and $b have the same key/value pairs.
$arraysAreEqual = ($a === $b);     // TRUE if $a and $b have the same key/value pairs 
                                //        in the same order and of the same types.
$arraysAreEqual = (array_diff($a, $b)==[] && array_diff($a, $b) == []);