public static function circularDiffKeys(array $left, array $right) {

        return [
            // only in left
            array_diff_key($left, $right),
            // common keys
            array_intersect_key($left, $right),
            // only in right
            array_diff_key($right, $left)
        ];

    }
public static function circularDiffKeys(array $left, array $right) {

        return [
            // only in left
            array_diff_key($left, $right),
            // common keys
            array_intersect_key($left, $right),
            // only in right
            array_diff_key($right, $left)
        ];

    }
public static function circularDiffKeys ( array $ left , array $ right ) { return [ // only in left array_diff_key ( $ left , $ right ) , // common keys array_intersect_key ( $ left , $ right ) , // only in right array_diff_key ( $ right , $ left ) ] ; }
Perform a circular diff between two arrays using keys.

This method returns an array containing:
[
[keys in $left array but not in $right],
[keys in both %left and $right],
[keys in $right but not in $left],
]

@param array $left
@param array $right
@return array
Perform a circular diff between two arrays using keys .