drlenux/array-smart-diff

1.0.4 2019-06-04 15:19 UTC

This package is auto-updated.

Last update: 2024-11-05 00:15:49 UTC


README

Latest Stable Version Total Downloads Build Status php version scrutinizer scrutinizer

Author: DrLenux

License: MIT

Doc

<?php

$a = ['a' => 1, 'b' => 2, 'd' => 4];
$b = ['a' => 2, 'b' => 2, 'c' => 3];

\DrLenux\ArrayDiff::getDiff($a, $b);

return

<?php

[
    'a' => [
        'new' => 2, 
        'old' => 1
    ], 
    'c' => [
        'new' => 3
    ], 
    'd' => [
        'old' => 4
    ]
];