src/JmesPath/Utils.php
public static function isEqual($a, $b)
    {
        if ($a === $b) {
            return true;
        } elseif ($a instanceof \stdClass) {
            return self::isEqual((array) $a, $b);
        } elseif ($b instanceof \stdClass) {
            return self::isEqual($a, (array) $b);
        } elseif ($a instanceof JmesPathableArrayInterface) {
            return Utils::isEqual(iterator_to_array($a), $b);
        } elseif ($b instanceof JmesPathableArrayInterface) {
            return Utils::isEqual($a, iterator_to_array($b));
        } elseif ($a instanceof JmesPathableObjectInterface) {
            return Utils::isEqual($a->toArray(), $b);
        } elseif ($b instanceof JmesPathableObjectInterface) {
            return Utils::isEqual($a, $b->toArray());
        } else {
            return false;
        }
    }
public static function isEqual($a, $b)
    {
        if ($a === $b) {
            return true;
        } elseif ($a instanceof \stdClass) {
            return self::isEqual((array) $a, $b);
        } elseif ($b instanceof \stdClass) {
            return self::isEqual($a, (array) $b);
        } elseif ($a instanceof JmesPathableArrayInterface) {
            return Utils::isEqual(iterator_to_array($a), $b);
        } elseif ($b instanceof JmesPathableArrayInterface) {
            return Utils::isEqual($a, iterator_to_array($b));
        } elseif ($a instanceof JmesPathableObjectInterface) {
            return Utils::isEqual($a->toArray(), $b);
        } elseif ($b instanceof JmesPathableObjectInterface) {
            return Utils::isEqual($a, $b->toArray());
        } else {
            return false;
        }
    }
public static function isEqual ( $ a , $ b ) { if ( $ a === $ b ) { return true ; } elseif ( $ a instanceof \ stdClass ) { return self :: isEqual ( ( array ) $ a , $ b ) ; } elseif ( $ b instanceof \ stdClass ) { return self :: isEqual ( $ a , ( array ) $ b ) ; } elseif ( $ a instanceof JmesPathableArrayInterface ) { return Utils :: isEqual ( iterator_to_array ( $ a ) , $ b ) ; } elseif ( $ b instanceof JmesPathableArrayInterface ) { return Utils :: isEqual ( $ a , iterator_to_array ( $ b ) ) ; } elseif ( $ a instanceof JmesPathableObjectInterface ) { return Utils :: isEqual ( $ a -> toArray ( ) , $ b ) ; } elseif ( $ b instanceof JmesPathableObjectInterface ) { return Utils :: isEqual ( $ a , $ b -> toArray ( ) ) ; } else { return false ; } }
JSON aware value comparison function.

@param mixed $a First value to compare
@param mixed $b Second value to compare

@return bool
JSON aware value comparison function .