protected function compareDnsRecords($original, $new)
    {
        $differences['original'] = $original;
        $differences['new'] = $new;

        foreach ($original as $original_id => $original_record) {
            foreach ($new as $new_id => $new_record) {
                if ($original_record == $new_record) {
                    unset($differences['original'][$original_id]);
                    unset($differences['new'][$new_id]);
                }
            }
        }

        return $differences;
    }
protected function compareDnsRecords($original, $new)
    {
        $differences['original'] = $original;
        $differences['new'] = $new;

        foreach ($original as $original_id => $original_record) {
            foreach ($new as $new_id => $new_record) {
                if ($original_record == $new_record) {
                    unset($differences['original'][$original_id]);
                    unset($differences['new'][$new_id]);
                }
            }
        }

        return $differences;
    }
protected function compareDnsRecords ( $ original , $ new ) { $ differences [ 'original' ] = $ original ; $ differences [ 'new' ] = $ new ; foreach ( $ original as $ original_id => $ original_record ) { foreach ( $ new as $ new_id => $ new_record ) { if ( $ original_record == $ new_record ) { unset ( $ differences [ 'original' ] [ $ original_id ] ) ; unset ( $ differences [ 'new' ] [ $ new_id ] ) ; } } } return $ differences ; }
Compare two DNS record arrays. We can not just do a normal array
compare - because the arrays can appear to be different, even
after sorting.

The most reliable method turns out to be a simple reduction of
arrays through individual compararions.

@param  array  $original
@param  array  $new
@return array
Compare two DNS record arrays . We can not just do a normal array compare - because the arrays can appear to be different even after sorting .